Hi there,
I am creating the menus for an mdi application. We have MainForm (the mdi parent) and a number of child forms inheriting BaseForm. Both have bar items. For a long time we could not open the designer on our forms - but this problem is now fixed. I tried to design one particular child form in which I had added menu items programatically.
Strange things happened, so I went back into code , removed all the items, and started again. However, once I started putting the menu items in toolbars and menus, visual studio 2005 started crashing constantly. Every time I tried to open the form in designer it crashed. Every time I built the project it crashed. I managed to get a message from the broken designer at one point that hinted at the fact that BarItems were to blame. Just now, during a build, I got this error:
"The "GenerateResource" task failed unexpectedly.
System.Reflection.TargetInvocationException: Type in the data at line 1628, position 5, cannot be loaded because it threw the following exception during construction: Object reference not set to an instance of an object. ---> System.Xml.XmlException: Type in the data at line 1628, position 5, cannot be loaded because it threw the following exception during construction: Object reference not set to an instance of an object. Line 1628, position 5. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.set_Manager(BarManager value)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception e)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)"
I can''t see what I am doing wrong. I didn''t have this problem in any other form. The only thing I could think of would be the fact that I am putting some BarItems under multiple different ParentBarItems. Would this cause problems?
Thanks,
TERRY ROSSOW