Home » Microsoft Technologies

There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'

When I first load my form into the designer it wll works correctly and I can switch to the code view with no problem.

After running my program or switching between design and code view I get the following error when I try and view the form in design mode

Warning 1 There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'.  0 0 

By deleting the Bin and Obj directories (or closing and reopening the form) I can get rid of this message - but it returns next time I open the form (or compile my program)

Any ideas?

By the way there is no menu on this form.

Chris Holland


4 Answers Found


Answer 1

Are you adding commands to the MenuCommand Service somewhere in your code? It would look something like: AddCommand(new MenuCommand(new EventHandler(this.ExecuteCut), StandardCommands.Cut));  

Answer 2

No there is nothing like that ion my code  or the designer  generated code.

I did a Search for "EventHandler" as well and only found the ones that I expected with no duplicates.


Answer 3

Here is the full error  message:

There is already a command  handler for the menu  command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'.

at System.ComponentModel.Design.MenuCommandService.AddCommand(MenuCommand command)
at System.Windows.Forms.Design.Behavior.BehaviorService.MenuCommandHandler.System.ComponentModel.Design.IMenuCommandService.AddCommand(MenuCommand command)
at System.Windows.Forms.Design.CommandSet..ctor(ISite site)
at System.Windows.Forms.Design.ControlCommandSet..ctor(ISite site)
at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
at System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
The only menu on the form  is a popup menu
Chris Holland


Answer 4

I have the exact same problem  and I have no menu  of any kind on my forms.  It appears as though it is being caused by Microsoft.VisualBasic.PowerPacks controls.  But that is unclear also.


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure