What are LoaderExceptions?

S

steve bull

I have a project with various forms but when I try to view the designer for one of the forms I get the following error messages -
even though the project atually compiles :


Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.



Instead of the form displaying I get :

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


Hide

at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at Microsoft.VisualStudio.Shell.Design.AssemblyObsoleteEventArgs..ctor(Assembly assembly)
at Microsoft.VisualStudio.Design.VSDynamicTypeService.ReloadAssemblyIfChanged(String codeBase)
at Microsoft.VisualStudio.Design.VSDynamicTypeService.CreateDynamicAssembly(String codeBase)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean
ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean
ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase,
ReferenceType refType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError,
Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetType(String typeName)
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)



Does anyone have any idea how I should go about getting rid of these errors?


Thanks for any help,

Steve
 
G

Guest

I think you mean the bug somebody already found a work-around for in the
"User Control Designer Errors is [sic] VS2005 RC1" thread.

Change your AssemblyInfo.cs files in the UserControls DLLs as follows:
[assembly: AssemblyVersion("5.5.5")]

Where 5.5.5 is any hard-coded version number. The problem was the .* in it
causing the UserControl to have an auto-generated version that's different
than what your other DLL is expecting. As soon as you recompile it with
changes or something, you get the Unable to Load error.

BTW - Notice I called it a BUG. I truly believe it's a bug. There's a
rational explanation for what it's doing, but it is bound to cause a little
frustration for a lot of people.

Let me know if it works.
 

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