Error in C# Designer for some forms

S

Suresh Kumar

Hai all,

I am porting my application from Visual Studio 2003 to Visual Studio
2005.The application has windows forms, user controls and resource files.I
can build the application and run the application without any errors.

But when i open the designer view for the user controls in the application,
i get a message 'Object reference not set to instance of an object' at
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection)...

The designer view is not able to display only for the user controls but able
to display other forms.
Can you please help me out for this problem??
 
K

Kevin Spencer

In order to display in the Design View, a Control must be instantiated, and
its' Paint method is called by the Designer to paint it. Apparently, there
is some code that is running when it is being loaded into the Designer that
is referring to an instance of an object that does not exist.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

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