Bug 417617

Summary: problem with mwf-designer
Product: [Mono] Mono: Tools Reporter: Thomas Braun <thomas.braun>
Component: toolsAssignee: Forgotten User CRPsQFwJ3b <forgotten_CRPsQFwJ3b>
Status: RESOLVED FIXED QA Contact: MD Bugs <monodevelop-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_CRPsQFwJ3b
Version: SVNKeywords: UI
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Thomas Braun 2008-08-15 14:17:24 UTC
Hi,

I converted the mwf-designer with python to visual studio.

If i run the program and add a new file with e.g.
namepace: test2
class: test2
file: test2.cs

i get the folowing error:
---------------------------
Fatal Error
---------------------------
A fatal error occured. Please file a bug report with the following details (Ctrl-C to copy to clipboard):



System.ArgumentException: Der Pfad hat ein ungültiges Format.

   bei System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)

   bei System.IO.Path.NormalizePath(String path, Boolean fullCheck)

   bei System.IO.Path.GetFullPathInternal(String path)

   bei System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)

   bei System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)

   bei System.IO.Directory.GetFiles(String path)

   bei mwf_designer.CodeProvider.FindCodeBehindFile(String file) in D:\WinFormDesigner\src\DesignTime\CodeProvider.cs:Zeile 96.

   bei mwf_designer.CodeProvider..ctor(String fileName, ITypeResolutionService resolutionSvc) in D:\WinFormDesigner\src\DesignTime\CodeProvider.cs:Zeile 84.

   bei mwf_designer.Document.Load() in D:\WinFormDesigner\src\Project\Document.cs:Zeile 86.

   bei mwf_designer.MainView.LoadDocument(String file, Workspace workspace) in D:\WinFormDesigner\src\UI\MainView.cs:Zeile 119.

   bei mwf_designer.MainView.newToolStripMenuItem_Click(Object sender, EventArgs e) in D:\WinFormDesigner\src\UI\MainView.cs:Zeile 163.

   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)

   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)

   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   bei System.Windows.Forms.Control.WndProc(Message& m)

   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)

   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)

   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   bei System.Windows.Forms.Application.Run(Form mainForm)

   bei mwf_designer.Program.Main() in D:\WinFormDesigner\src\Program.cs:Zeile 24.
---------------------------
OK   
---------------------------




If i start the app again and load the file test2.cs i get a blank form.
When i now try to add a button or something else to the form, i click on that element and on click i get thi smessage:

-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----

---------------------------
Fatal Error
---------------------------
A fatal error occured. Please file a bug report with the following details (Ctrl-C to copy to clipboard):



System.InvalidCastException: Das Objekt des Typs "System.Windows.Forms.Design.ButtonBaseDesigner" kann nicht in Typ "Mono.Design.ControlDesigner" umgewandelt werden.

   bei Mono.Design.ParentControlDesigner.CreateToolCore(ToolboxItem tool, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize) in D:\WinFormDesigner\deps\Mono.Design\class\System.Design\System.Windows.Forms.Design\ParentControlDesigner.cs:Zeile 169.

   bei Mono.Design.ParentControlDesigner.CreateTool(ToolboxItem tool) in D:\WinFormDesigner\deps\Mono.Design\class\System.Design\System.Windows.Forms.Design\ParentControlDesigner.cs:Zeile 141.

   bei Mono.Design.ParentControlDesigner.InvokeCreateTool(ParentControlDesigner toInvoke, ToolboxItem tool) in D:\WinFormDesigner\deps\Mono.Design\class\System.Design\System.Windows.Forms.Design\ParentControlDesigner.cs:Zeile 136.

   bei Mono.Design.DocumentDesigner.ToolPicked(ToolboxItem tool) in D:\WinFormDesigner\deps\Mono.Design\class\System.Design\System.Windows.Forms.Design\DocumentDesigner.cs:Zeile 451.

   bei Mono.Design.DocumentDesigner.System.Drawing.Design.IToolboxUser.ToolPicked(ToolboxItem tool) in D:\WinFormDesigner\deps\Mono.Design\class\System.Design\System.Windows.Forms.Design\DocumentDesigner.cs:Zeile 434.

   bei mwf_designer.MainView.OnToolbox_ToolPicked(Object sender, EventArgs args) in D:\WinFormDesigner\src\UI\MainView.cs:Zeile 87.

   bei mwf_designer.ToolBoxList.OnToolPicked(EventArgs e) in D:\WinFormDesigner\src\UI\ToolBoxList\ToolBoxList.cs:Zeile 104.

   bei mwf_designer.ToolBoxList.item_Click(Object sender, EventArgs e) in D:\WinFormDesigner\src\UI\ToolBoxList\ToolBoxList.cs:Zeile 121.

   bei System.Windows.Forms.Control.OnClick(EventArgs e)

   bei mwf_designer.ToolBoxListItem.OnClick(EventArgs e) in D:\WinFormDesigner\src\UI\ToolBoxList\ToolBoxListItem.cs:Zeile 95.

   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   bei System.Windows.Forms.Control.WndProc(Message& m)

   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   bei System.Windows.Forms.ContainerControl.WndProc(Message& m)

   bei System.Windows.Forms.UserControl.WndProc(Message& m)

   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   bei System.Windows.Forms.Application.Run(Form mainForm)

   bei mwf_designer.Program.Main() in D:\WinFormDesigner\src\Program.cs:Zeile 24.
---------------------------
OK   
---------------------------

-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----
Comment 1 Forgotten User CRPsQFwJ3b 2008-08-18 22:05:23 UTC
Fixed in r110870.