471,610 Members | 1,316 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Form designer problem - cannot load a form

I got this kind of error recently:

When I tried to open a form I got error something like this:
One of more errors encountered while loading the designer. The errors are
listed below. Some errors can be fixed by rebuilding your project, while
others may require code changes.

Look at the lines all are referencing the system things such as

at System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(String
codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(String
codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Assembly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(String
fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchNormalEntries(AssemblyName
assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionService.GetType(String
name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionService.GetType(String
name)
at
System.ComponentModel.Design.Serialization.Designe rSerializationManager.GetType(String
typeName)
at
System.ComponentModel.Design.Serialization.Designe rSerializationManager.System.ComponentModel.Design .Serialization.IDesignerSerializationManager.GetTy pe(String
typeName)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeStatement(IDesignerSeria lizationManager
manager, CodeStatement statement)

Any hints ?
Nov 9 '06 #1
5 2833
There are some things u can do.

1.) rebuild the project and try to open the form
2.) if that fails close VS and open it again
3.) may be there is a bug inside the serialized data in the resx file.
4.) u have a property inside a custom control that needs some other
initialization that the designer can't do

If you have a problem with designer and serialized properties of
costomcontrols see the DesignerSerializationVisibility attribute.

Nov 9 '06 #2
Hi,

I have tried several times say up to 5 or 6 times close solutions, close VS
and reopen, then it fixed. This error suddenly happened.

For (3), how to figure out what is the bug if ther is any?
For (4), how do I know which properties ?

How to read/see DesignerSerializationVisibility ?

This is my situation, in my solution I got several projects (DLL), some DLL
will be referenced by other DLL projects (added in the references). I first
encountered it some days ago, then I moved the whole solution in another
folder, reopen the form with no error. However, then sometime later reopened
with error again.

"Roman Wagner" <ro**********@gmail.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
There are some things u can do.

1.) rebuild the project and try to open the form
2.) if that fails close VS and open it again
3.) may be there is a bug inside the serialized data in the resx file.
4.) u have a property inside a custom control that needs some other
initialization that the designer can't do

If you have a problem with designer and serialized properties of
costomcontrols see the DesignerSerializationVisibility attribute.

Nov 9 '06 #3
Serialzationproblem: look at the resx file generated from designer and
search for serealized data.

If u have a dll that needs an other dll add both to the list of
references

Nov 9 '06 #4
I opened the resx of my form and found only one entry in the table:
FolderBrowserDialog.

Now the situation getting worse, every form in my current project cannot be
opened, all have errors.
Other projects in my solution are fine opening the forms with no error.

"Roman Wagner" <ro**********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Serialzationproblem: look at the resx file generated from designer and
search for serealized data.

If u have a dll that needs an other dll add both to the list of
references

Nov 9 '06 #5
I often get spurious errors; in other threads the cure is to close VS,
delete the bin and obj folders, open VS, build the project and voila! the
designer works again. Has never failed me yet.

"Alan T" <al*************@yahoo.com.auwrote in message
news:OC**************@TK2MSFTNGP03.phx.gbl...
>I opened the resx of my form and found only one entry in the table:
FolderBrowserDialog.

Now the situation getting worse, every form in my current project cannot
be opened, all have errors.
Other projects in my solution are fine opening the forms with no error.

"Roman Wagner" <ro**********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>Serialzationproblem: look at the resx file generated from designer and
search for serealized data.

If u have a dll that needs an other dll add both to the list of
references


Nov 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Chris | last post: by
3 posts views Thread by Peter Cresswell | last post: by
7 posts views Thread by Studio P.M. | last post: by
4 posts views Thread by Matthew | last post: by
4 posts views Thread by Rod Gill | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.