All Forms Generate Errors

G

Guest

I can create a windows application in VB.Net or C# and when I run the application I get the following error.

An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll

Additional information: Object reference not set to an instance of an object.

Please Note: I have not added any code or controls, and yet I still get this error.

Additionally, I have unistalled both VS.Net and The framework and yest this problem persists. Any Adice?

Thanks
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?cmVoYW5k?= said:
I can create a windows application in VB.Net or C# and when I run the application I get the following error.

An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll

Additional information: Object reference not set to an instance of an object.

Please Note: I have not added any code or controls, and yet I still get this error.

Additionally, I have unistalled both VS.Net and The framework and yest this problem persists. Any Adice?

Remove the '<System.Diagnostics.DebuggerStepThrough()>' from 'Sub
InitializeComponent' and post the line of code that causes the
exception (if it's caused in this sub).
 
G

Guest

I removes the '<System.Diagnostics.DebuggerStepThrough()>' as you specified, but I am still getting the error.

I did not add any code to the form, this is just a base windows form. When I ran it after removing the line in question, I still got the same error.
 
G

Guest

I think this started after I open a project compiled under version 1 of the framework. Ever since then, I have been getting this erro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top