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 :
I Have looked around and if you type
"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. " IN GOOGLE
you gets loads + a notification by Microsoft that says that they could not fix it before release
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=d863064b-04e0-4b54-8f2e-55a43ba29163
now this leaves me STUCK.
I wonder whether somebody has found a stable workaround!!.
i get this silly error
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)
Anybody any ideas

VS 2005 RTM WINFORM DESIGNER BUG IS DRIVING ME CRAZY
KSamir
I use VS 2005 and I am getting the same error.
I have developed an externe library (DLL project) with many custom controls in the same solution but the reference for this DLL sometimes is lost and I see the error below when I try to see the design of my form (EXE project).
I lost so much time linking the library again, reconfiguring some custom controls that are not compiling or being displayed.
Could you please solve this problem and release a new version asap
Thank you very much.
Best regards,
Joao Araujo
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, Boolean throwOnError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs, String name, Dictionary`2 names)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary`2 names, CodeStatementCollection statements, String className)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Tim Tharratt
1) create a solution Name "TestSolution"
2) Add a windows Control library project Name it "Dev.UI.WinForms"
3) Add a folder "BaseForms"
4) Right click on it and add a form "FormBase" to this folder
5) Add a folder and name it "MyTextBoxes"
6) Add a class to this folder and Name it TextBoxEx
7) Add a namespace to the textboxEx "using System.Windows.Forms"
8) Add inheritance TextBoxEx :TextBox
9) Add A Windows Application project to the solution
11) rebuild the solution so that we can see our textBoxEx Control
12 ) Add our textBoxEx to Form1
13) enter form1 code and Add a namespace "using Dev.UI.WinForms.BaseForms;"
14) change the inheritance from Form to FormBase
15) rebuild the solution twice and you should see the error.
16) Close VS and go back in .everything is ok
17) rebuild the solution and you have the problem.
I have never posted a bug before where do you do it.
Or can somebody pass it on
thanks a lot
bobbynad
I faced with similar problem and this is what i did which worked for me!
1. When you open your form, you get this error. Close all the forms.
2. Close VS.NET (make sure none of the forms are open at this time)
3. Delete "bin" and "obj" folder physically.
4. Open VS.NET
5. Rebuild your application
6. Try opening your forms now. It should work!
I am assuming that its using some assembly cache when forms are opened though not sure.
HTH,
-Rupreet
I Blog @ http://geekswithblogs.com/rupreet.
Miyamoto M
^ Above workaround solved the issue for me.
Thanks and happy holidays!
Chris
Joe2005
Rick0124
That bug report you linked to didn't have an example project with it and therefore the issue was not reproduced.
To have more of a chance for Microsoft to address it, they need to:
So I suggest that you post a new bug report with example code that can reproduce it. That way other users can vote on it if they are also experiencing the same thing.
Aaron R
markwebber#1
This error usually occurs to me when the form designer try to load an object that doesnt exists on form. From what I saw, it can happen in some situations, specially if you use inherited forms. The form designer in some cases don't remove the generated code for removed components, when you try to open the form again it will try to access the component but it will not exist on your form.
To fix this you should edit your form and your designer code, and look for declared objects that doesnt exists on your form or your base form. Remove any unused declarations, clean the solution and close the visual studio.
Each form is consisted of 3 files form.vb, form.resx and form.designer.vb (or .cs if you use C#). To edit the last 2 files you need to choose the show all files option on Solution Explorer Window.
Open it again, rebuild your solution and it will work.
Best regards.
Fernando Cardoso
wheelersctt
I will try to reproduce later on and send a bug report.
I have noticed that it happens with form inheritance.
I will try to find out where actually goes wrong.
Also i have so many problems with userControls,component and the designer keeps playing up"Dissappering".I cannot pinpoint how and when but in my eyes it's not stable.
It should be allright as everything is now generated in a partial class but it seems that somehow something is going wrong.
thanks for any feedback.
RUSSO
CConchelos
When you change something on referenced classes that can create the error situation it will hapen be sure of it.
Best regards.
Fernando Cardoso
ACS
I read that the problem appears to be "stale" binaries left from before my original solution was converted to 2.0. If using source control, check everything in and get a new working copy. For me, this new working copy does not appear to suffer the same problems.
Yunjing MA
I have created a test as per my previous post with an inherited form and 1 control.
after rebuilding a get the error.
I think it's a critical bug and should be addressed asap and a patch rollout.
I know that things are always more complicated than they seem but in my little experience writing controls /component in vs2005 i have encountered so many problems with the designer that made me not use form inheritance and duplicate my code in many scenarios.
thanks
RZ0
There is a workaround posted here:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=91206&SiteID=1&PageID=1