all groups > visual studio .net ide > november 2003 >
You're in the

visual studio .net ide

group:

REPOST: NullReferenceException opening form designer


REPOST: NullReferenceException opening form designer Chris Dunaway
11/26/2003 6:08:12 PM
visual studio .net ide: I still have not got any help with this issue.

I installed VS.Net 2003 on my mahcine and there were no errors. When I
create a Windows Forms application, The form designer comes up with a big
red X across it with a messagebox that says there's NullReferenceException
with no indication of where it is occurring. The application compiles with
NO error and runs fine. Its just that the form will not open in the
designer.

I started up a second instance of the development environment and attached
the debugger to the first instance and opened my Windows Application. When
the exception occurs, the following appears in the output window.

I have uninstalled and re-installed several times with no luck.

Can anyone help or suggest a course of action?


*******************
System.NullReferenceException: Object reference not set to an instance of
an object.
at System.Drawing.SafeNativeMethods.GdipCreateFontFromLogfontW(HandleRef
hdc, Object lf, IntPtr& font)
at System.Drawing.Font.FromLogFont(Object lf, IntPtr hdc)
at System.Drawing.Font.FromHfont(IntPtr hfont)
at System.Windows.Forms.Control.get_DefaultFont()
at System.Windows.Forms.Control.get_Font()
at System.Windows.Forms.Control.AssignParent(Control value)
at System.Windows.Forms.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.DesignerFrame..ctor(ISite site)
at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent
component)
at
System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent
component)
at Microsoft.VisualStudio.Designer.Host.DesignerHost.Add(IComponent
component, String name)
at
Microsoft.VisualStudio.Designer.Host.DesignerHost.CreateComponent(Type
componentClass, DesignSite newSite)
at
Microsoft.VisualStudio.Designer.Host.DesignerHost.CreateComponent(Type
componentClass, String name)
at
Microsoft.VisualStudio.Designer.Serialization.CodeDomLoader.System.Compone
ntModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(
Type type, ICollection arguments, String name, Boolean addToContainer)
at
System.ComponentModel.Design.Serialization.RootCodeDomSerializer.Deseriali
ze(IDesignerSerializationManager manager, Object codeObject)
at Microsoft.VisualStudio.Designer.Serialization.CodeDomLoader.Load()
at
Microsoft.VisualStudio.Designer.Serialization.BaseDesignerLoader.Load()
Re: REPOST: NullReferenceException opening form designer Kerry Sanders
11/27/2003 2:08:54 AM
On Wed, 26 Nov 2003 18:08:12 -0600, Chris Dunaway
[quoted text, click to view]


Are you using any third-party controls on your winforms app? Have you had any
version of Visual Studio .NET installed other than 2003?
Re: REPOST: NullReferenceException opening form designer Chris Dunaway
11/27/2003 4:53:02 PM
[quoted text, click to view]

This occurs on a brand new project with nothing added to it.

[quoted text, click to view]

No
Re: REPOST: NullReferenceException opening form designer Kerry Sanders
11/27/2003 11:33:02 PM
Have you tried doing a repair of the installation or reinstalling Visual Studio
..NET 2003. Something may have not gotten registered properly as the install was
finishing up.
Re: REPOST: NullReferenceException opening form designer Chris Dunaway
12/2/2003 9:41:48 AM
[quoted text, click to view]

I have tried repairing with no success. And as I've said, I have
uninstalled and re-installed several times.

In answer to the question about prior versions, I may have had the beta on
this machine a long time ago, but I can find no evidence of this. Do you
know of any links that tell how to remove all traces of .Net from my
system? I tried going through the registry and removing entries that had
to do with .Net, but I probably didn't find them all. I still got the same
issue.


--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
AddThis Social Bookmark Button