Search code examples
c#winformsdesigner

visual studio 2008 error at accessing form designer


To prevent possible data loss before loading the designer, the following errors must be resolved:

list of errors (the name isn't that important):

The variable 'TextEditor' is either undeclared or was never assigned. .... ...

then it goes:

Instances of this error (1)

  1. Hide Call Stack

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

It builds but cant access the form (opens empty form if I press ignore)...

Thanks!


Solution

  • I can't remember well but thre was an attribute like [Designmode(false)] or anything like this. This attribute ignore properties in design mode. So designer don't access this property when you open your design mode. If is problem about with your custom class and if you can edit class you can add this attribute to property which occures this error. Or instead of this you can try followings.

    1. close all opened documents (ALT+(W->L) ) or from the top menu. And then builkd and open your form.

    2. Close all documents in visual studio, clear your projects obj and bin folders if you can and rebuild your projects or clean solution.

    3. Close all documents in visual studio clear bin and obj folders, Restart your visual studio and rebuild your solution.