Windows Develop Bookmark and Share   
 index > Windows Forms Designer > One or more errors encountered while loading the designer
 

One or more errors encountered while loading the designer

Hi,

I was working on a simple Winforms C# project. I created a few of TableAdapters using the designer and attached them to datagridviews on my form. After realizing that i did not want one of the tables I went to the XSD designer and deleted it. After that the project still excutes ok but the form designer is unable to display the form in design view I get the following error:

One or 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. Clicking on each error will take you to the line of code that caused it. 

I am not looking for a response to this problem (creating prototype, kicking the tires ;-)) but hopefully Microsoft will address this issue with some sort of fix. The designer should probably utilize some referential integiry rules (cascade or restirct) before it allows one to remove items that will cause it not to function properly.

Regards

FredV

FredV  Friday, December 30, 2005 8:02 PM

FredV -
Thanks for posting this issue on the forums.  Can you log this suggestion with additional details on the Product Feedback(http://lab.msdn.microsoft.com/productfeedback/) site so we can track it internally?

Thanks!
Karen

Karen Liu MSFT  Wednesday, January 04, 2006 2:19 AM

FredV -
Thanks for posting this issue on the forums.  Can you log this suggestion with additional details on the Product Feedback(http://lab.msdn.microsoft.com/productfeedback/) site so we can track it internally?

Thanks!
Karen

Karen Liu MSFT  Wednesday, January 04, 2006 2:19 AM

Thishas happened to me also, on more than one occasion.

Sometimes I am able to get around it by editing the designer code and removing the erroneous references.

Other times I wind up having to junk my form and start fresh. And the acceptability of doing that is inversely proportional to the amount of time you've spent customizing it.

So unlike the original poster, I really am looking for a solution to this problem.

TechnoGuy  Tuesday, April 04, 2006 5:15 PM

I got the same problem when upgrading a functioning projectfrom Visual Studio .NET 2003 to Visual Studio 2005.

The upgrade wizard went through without errors, and the application can be executed normally, but none of my forms can be displayed in designer view.

I even get no error line number, only a line number 0, and a lot of details like:

at System.Resources.Tools.StronglyTypedResourceBuilder.DefineResourceFetchingProperty(String propertyName, String resourceName, ResourceData data, CodeTypeDeclaration srClass, Boolean internalClass, Boolean useStatic)
at System.Resources.Tools.StronglyTypedResourceBuilder.InternalCreate(Dictionary`2 resourceList, String baseName, String generatedCodeNamespace, String resourcesNamespace, CodeDomProvider codeProvider, Boolean internalClass, String[]& unmatchable)
at System.Resources.Tools.StronglyTypedResourceBuilder.Create(IDictionary resourceList, String baseName, String generatedCodeNamespace, String resourcesNamespace, CodeDomProvider codeProvider, Boolean internalClass, String[]& unmatchable)
at System.Resources.Tools.StronglyTypedResourceBuilder.Create(IDictionary resourceList, String baseName, String generatedCodeNamespace, CodeDomProvider codeProvider, Boolean internalClass, String[]& unmatchable)
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.BuildType()
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.GetObjectType()
at Microsoft.VisualStudio.Shell.Design.GlobalType.get_ObjectType()
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.get_Children()
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.CreateGlobalObjectsForItem(ProjectItem item, GlobalObjectCollection oldObjects, GlobalObjectCollection newObjects, ITypeResolutionService typeResolver)
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.CreateGlobalObjects(Project project)
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.GetGlobalObjectsCore(Project project, Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.GetGlobalObjects(Project project, Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(String name, Boolean throwOnError, Boolean ignoreCase)
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)

I also would really appreciate if Microsoft would fix that asap.

IT-Beratung  Tuesday, May 23, 2006 8:31 AM
Has anyone found solution to this last problem?
Meffistas  Wednesday, June 07, 2006 3:07 PM
It has happened to me, too, but the problem went away when I restarted VS.
Guido den Broeder  Wednesday, June 07, 2006 9:06 PM

I have encountered this problem too. It seems that it was related to the user controls that I have created. When I created a temporary form and drag the user controls, a messagebox pops up and it tells me the following error:

Failed to create component 'TestControl'. The error message follows: System.NullReferenceException: Object reference not set to an instance of an object at System.Resources.Tools.StronglyTypedResourceBuilder.DefineResourceFetchingProperty(String propertyName, String resourceName, Resource Data, ...

)

The control has the following code:

Option Explicit On

Option Strict On

Public Class testcontrol

Inherits UserControl

Public Function CheckedRectangleF(ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single) As RectangleF

Return New RectangleF(x, y, CSng(IIf(width <= 0, 1, width)), CSng(IIf(height <= 0, 1, height)))

End Function

Private Sub testcontrol_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

Dim recfBox As RectangleF

Dim lbr As LinearGradientBrush

recfBox = CheckedRectangleF(0, 0, Me.Width - 1, Me.Height - 1)

lbr = New LinearGradientBrush(recfBox, Color.CornflowerBlue, Color.DarkBlue, LinearGradientMode.Vertical)

e.Graphics.FillRectangle(lbr, recfBox)

lbr.Dispose()

End Sub

End Class

cmd_skywalker  Thursday, June 15, 2006 6:48 PM

I get this error everytime I makea change to the .xsd file associated with the dataset used by the application. This is a native VS2005 app (not upgraded from 2003), there are no invalid references, so I'm not sure what is causing this, it is very frustrating because I am prevented from editing the form in design view.

In my case I have to restart VS to clear the errors and get back to editing. The app builds fine, runs fine and works great. That is until I edit the .xsd file again, then the cycle starts over.

BruceTT  Friday, June 16, 2006 9:43 PM

Yep I also have this problem.

For me it is because I have a custom component and I have added it to several forms. When I make a change to the custom component the form designer will no longer load.

I may have made a mistake on my custom component ..not sure...but this is a major issue because I have at least 5 forms that won't load at all right now.

FergusLogic  Monday, July 03, 2006 4:46 PM
Yep I also have this problem.Anyone got a solution for this??
PAANIS  Wednesday, July 12, 2006 8:49 PM
IT-Beratung wrote:

I got the same problem when upgrading a functioning projectfrom Visual Studio .NET 2003 to Visual Studio 2005.

The upgrade wizard went through without errors, and the application can be executed normally, but none of my forms can be displayed in designer view.

Hi, IT-Beratung,

Have you found any solution to your problem. I am having exactly the same problem when upgrading from vs2003 to vs2005. The project was built successfully. But the designer couldn't load the forms. The error I got was like:

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 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

I'd appreciate if anyone can help me to solve this.

weisun  Friday, July 28, 2006 7:09 PM
I got the same problem when upgrading from vs 2003 to vs 2005. Has anyone solved this problem?
weisun  Friday, July 28, 2006 7:15 PM

Up to now I got no solution to the upgrading problem.

I filed the problem with Microsoft Support, but besides the advise to disable "Localization" in trhe forms before upgrading, which did not solve the problen, I got no further feedback from them. Seems as if Microsoft is not interested in helping to solveits client's problems!!

IT-Beratung  Tuesday, August 08, 2006 9:50 AM

I finally found a solution (without any meaningful help from Microsoft Support - they urgently should improve their service to customers!!!!)

a) convert the old .resx files to .resources files via ResGen - after this you will be able to see your forms in Desiger mode again, but you cannot change or amend the resources

b) remove the old .resx files from your project

c) convert the (new) .resources files to new .resx files again with ResGen

d) remove the .resources files from you project and include the new .resx files

All should be functioning now.

I hope this helps also the others who had a similar problem.

I wonder however why this simple procedure cannot be performed by the "upgrade wizard" when opening an old .NET 2003 project the first time in VS 2005!!

IT-Beratung  Sunday, August 27, 2006 2:01 PM

I found this solution on some website, cannot find it now.

Close all the desinger forms in Visual Studio. Close Visual Studio. Delete all the 'bin' and 'obj' files of all projects in your solution.

Relaunch Visual studio and load the project, rebuild it and you can now should be able to see the designers.

pankaj chaudhari  Tuesday, August 29, 2006 11:19 PM
http://geekswithblogs.net/rupreet/archive/2005/12/21/63740.aspx

Worked for me on different scenarios.
Milos.Sakovic  Sunday, September 17, 2006 12:42 AM
http://geekswithblogs.net/rupreet/archive/2005/12/21/63740.aspx

Look at the 3rd feedback by Ian Posner:

"I believe the problem is caused by the Indexing Service locking the obj and bin files, trying to reindex their contents. Simply select your Projects folder in Explorer, go to Properties..., click the Advanced button and disable the checkbox to allow the indexing of the folder and subdirectories and files. "

This worked like a charm.

m
Milos.Sakovic  Sunday, September 17, 2006 12:46 AM
http://geekswithblogs.net/rupreet/archive/2005/12/21/63740.aspx

Look at the 3rd feedback by Ian Posner:

"I believe the problem is caused by the Indexing Service locking the obj and bin files, trying to reindex their contents. Simply select your Projects folder in Explorer, go to Properties..., click the Advanced button and disable the checkbox to allow the indexing of the folder and subdirectories and files. "

This worked like a charm.

m
Milos.Sakovic  Sunday, September 17, 2006 12:48 AM

As one evaluation step in our project I also tried to convert the VS 2003 project to VS 2005. I faced similar problems and tried the Sync Fusion Resx Converter as well as your solution. The Sync Fusion Converter malfunctions because of custom controls we developed for the VS 2003 project, Microsoft Visual Studio can't open the form and therefore cannot convert the resources and a manual conversion with the ResGen like you described works to view the form but when I try to change something the designer malfunctions again.

At some parts of the project we also needed to use Active X controls in the form. Somehow it isn't possible any more to add those controls to the new toolbar which might become another problem.

Isn't there some schema for the old and new resx - file format and a good professional converter for that? It seems that everybody creates his own small solutions now and the problems reappear. The msdata schema seems to be not accessable in the internet, is that true?

I have not found any new fixes related to this migration topic in the SP 1 of MS Visual Studio 2005. Does anyone know how to convert a bigger project?

Some very easy forms of the VS 2003 designer get converted by Microsoft's new designer but most of the time it just malfunctions with more complex forms.

Thank you all,

Bernhard

Bernhard Mähr  Friday, September 29, 2006 12:41 PM

I have a custom component that I use on about 30 forms.

When I make a change to the custom component I receive this white screen of death on all of my forms that use the custom component.

Object of Type 'my type' cannot be converted to type 'same exact type'

this is reallllllllly bad.

If I close visual studio and re-open it..everything goes back to working again.

FergusLogic  Wednesday, October 04, 2006 7:53 PM
I tried your method still cannot work but I copy from mybackup project filesxx.csproj, xx.csproj.user and xx.sln to replace my currenct project files.I solved the problem.The problem may cause by after I install the VS2005 C#Express and I try to open the project inthis version. This problem was take me a lot time tosearching for solution. Hope other will be fine after try thisway.
Vincent Tan  Saturday, October 14, 2006 3:19 PM

http://geekswithblogs.net/rupreet/archive/2005/12/14.aspx

with this Url it's Ok now for me.............................

bye from FRANCE

magat  Thursday, October 19, 2006 3:39 PM

Hi IT-Beratung:

I have tried the way by using resgen.exe to convert old .resx file but still not working correctly. Do you have any other ways to fix the problem?

Thank you

skywalker_va  Friday, October 27, 2006 2:33 PM

Hi,

If you add a class in the windowform(forexamplefrmMain.cs), add the class below the form. because the IDE will process the winform first, that was a fix for me.

System.*

namespace EZPilotCouplerTest

{

public partial class frmMain : Form
{

} //end frmMain

public class SomeClass
{

}//end SomeClass

}// end namespace

Joseph Pham  Saturday, February 03, 2007 12:41 AM

Me too faced the same problem.

I used to close the design window and open it by right-click the file from "Solution Explorer" and select "View Design" instead of using short-cut keys. This works for me several times. But if the design really has some bug, then you've to remove/edit the code manually to overcome this issue.

Regards,

Arunagiri GT

Arunagiri GT  Monday, May 14, 2007 2:45 AM
Nice thought. Didn't work.


jimh12345  Tuesday, May 22, 2007 10:56 PM

I have tried all the suggestions made on the previous posts, and unfortunately, none of them worked.

I just removed the form components which initialization depends on Resources content from InitializeComponent() to the form constructor section, right before the InitializeComponent() call.

Something like this:

For example, we have this code, at the Form1.Designer.cs file:

partial class Form1

{

...

private void InitializeComponent()

{

...

this.backColoredTabControl1.BorderImageDisabled = ProjectName.Properties.Resources.Background3;

...

}

}

I took this.backColoredTabControl1.BorderImageDisabled = ProjectName.Properties.Resources.Background3 away from InitializeComponent() , and inserted itafter its call at the form constructor at the Form1.cs file:

public partial class Form1:Form

{

public Form1()

{

...

InitializeComponent();

this.backColoredTabControl1.BorderImageDisabled = ProjectName.Properties.Resources.Background3;

...

}

}

Although the resources items are not loaded, the Forms Designer loads the form. This is not a good solution though, but I found better than having nothing to see when I need to do some forms modeling.

Max Ueda  Monday, August 06, 2007 6:03 PM

This solution works for the designer - I will definitely try it for the same error when its related to a dataset. Last time, I had to revert to backup copy which wasted a lot of code.

Thank You!

mel cc  Thursday, October 04, 2007 10:17 PM
Igot the same problem when upgrading from vs 2003 to vs 2005.

I cant see my forms in Designer mode. I wanna try the solution u provided, but what's ResGen?? Howtoconvert the old .resx files to .resources files via ResGen?? I directly change the extensions from.resx to .resources, is it correct?

Sunlhs  Thursday, January 03, 2008 8:06 AM

Igot the same problem when upgrading from vs 2003 to vs 2005.

I cant see my forms in Designer mode.


One or 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.

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Hide

at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Hide

at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c)


HELP!!! Who can help me...? I need to solve it urgently!! Thank a lot�/div>
Sunlhs  Thursday, January 03, 2008 9:50 AM

Hi,

I found this thread while searching for why I suddenly couldn't openseveral forms in design mode any more, so now that I havefound thesolution, I thought I'd mention it here in case somebody else accidentally does what I did.

I found that the cause, in my cases, was that I had inadvertently used a custom property in the "Load" event BEFORE I had initialised it anywhere. The forms ran ok, because I was initialising the property in a custom overloaded "New" proc, which all my calls to those formswere using, but the designer was,rather obviously in hindsight, instantiating the form with the "New" proc that had no parameters, and consequently not initialising the propertybefore attempting to use it.

The error message said something about "obejct not set to instantiated instance", or something similar, which once I discovered the problem became blindingly obvious, lol.

This may not be the answer those of you who are having problems after converting from one version of .NET to another, but it was what I needed, so I hope it will be of use to someone else as well..

Yann

Yann Duran  Tuesday, January 08, 2008 8:31 AM

Hi,

I tried turning off indexing, and deleting the obj and bin folders (but only of the project containing the problematic form), and converting the .resX files in the affected project to .resources files and back, with no effect. I found that I had inserted code to add an event handler for one of my classes between similar code for controls on the form. When I moved this code to the form constructor I could enter the designer without the error. I don't know if the other things I did contributed to the fix or not, but when I moved that code it worked.

GaryC2003  Tuesday, January 08, 2008 6:01 PM


Hi,

Me too faced the same problem.

I solved it with installing the SP1 for Visual Studio 2005.
File: VS80sp1-KB926601-X86-ENU.exe from the Microsoft Download Sides.

from the seven hills by the Rhine
Achim Busenbender
Wirtgen



mcbus  Tuesday, January 15, 2008 9:53 AM
On a couple of occassions, I've fixed this sort of issue by deleting the solution's SUO file (it gets recreated when needed and is not under source control). Other times I've fixed it by deleting references and reasserting them (custom controls and the like). Other times, I've just lived with it because there was no solution (WPF in an '05 environment and referencing controls within the main project assembly - How could there be a failure to find the main project's assembly in which the XAML file itself resides? Bug!)

==

Richard Lewis Haggard

RickLH  Wednesday, January 16, 2008 2:22 PM
I got the same problem some times and i found a simple solution that looks working:
Go to your project debug folder

ex. : C:\Documents and Settings\User\Documents\Visual Studio 2008\Projects\MyProject\MyProject\Debug

find the .obj file relative to the no-working form

ex. : C:\Documents and Settings\User\Documents\Visual Studio 2008\Projects\MyProject\MyProject\Debug\MyForm.obj

simply delete it!

After that, the next time you will start visual studio it will show the "first time lunching" dialog, but after few seconds you will be able to work on the dialog designer again.

Hope this will help.

P.s. i use "Visual C++ 2008 Express Edition", and i don't know if this way will works on C#, VB or else.
Cunctator  Sunday, January 20, 2008 10:12 PM

Dear All,

While converting VS 2003 project into VS 2005, Im not able to open forms in form designer and i get this following warning message.Can anybodyhelp me in this regard? This is C# device application.

Thanks,

Ansar

One or 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.


Cannot resolve dependency to assembly 'System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Hide


at System.Reflection.Assembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Boolean reflectionBased, Assembly& assembly, String description)
at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.SearchNormalEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Boolean reflectionBased, Assembly& assembly)
at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Boolean reflectionBased, Assembly& assembly)
at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.GetDeviceType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.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)

Ansar.Munavar  Saturday, February 02, 2008 8:59 AM

Hello,

I just installed VS 2005 standard on my windows xp computer. and I get the following error when I try to look at my forms.

One or 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.

No more data is available.
Hide

at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.GetValueNames()
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.AppendWindowPanes(RegistryKey parentKey, ArrayList windowPanes)
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.GetRegisteredPanes(String extension)
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.DeferrableWindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.DeferrableWindowPaneProviderService.DeferredWindowPane.EnsurePane()

I have tried the indexing thing but it didnt work for me.anyone have any ideas?

Jolijar  Tuesday, February 26, 2008 7:45 AM

shut down visual studio and re-open it...the problem should go away and you should be able to view your forms again.

FergusLogic  Tuesday, February 26, 2008 7:23 PM

I was having the same problem for 2 reasons

1) I removed the default constructor from the user control and I added a few the expect parameters, therefore when I added the control VS wasn't able to create the control (...new UserControl()....) in the partial class.

2) In the constructor I was trying to read from the app.config file (for more information about this problem please check the following link http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2796462&SiteID=1) and to solve this problem I used the Setings file.

Good luck

Itzik Kramer  Wednesday, February 27, 2008 7:12 AM

Hi,

can you please contact me to my mail?

odedyh@walla.co.il

thanks,

Oded

OdedOded  Friday, February 29, 2008 10:59 AM

Have you read the rest of this thread? It seems like it's different strokes for different folks. In my case, I have a reference to Interop.WMPLib.dll, which it says it can't find, although it is alive and well (well, my app works). I think I get the error after I build the first time after opening VS, or maybe it's the first time I close and reopen it after building. Anyway, what I do is remove and then re-add the reference to this DLL. I may have to rebuild after that, I haven't been working on it for a while. I can then usually keep VS opened and it seems to keep working. Your mileage will probably vary-- the details of your error are different than mine, so as I said, read the rest of the thread.

GaryC2003  Friday, February 29, 2008 7:44 PM
I also ended up having to delete the project's .suo file. Hope this helps anyone.
Ori A_  Saturday, March 01, 2008 12:14 AM
I never post on these sites but after a wasted day of BS for this error, I figured someone else could use a idea to fix it. After 5 and a half grewling hours of looking through 700 files to find the error, I found that having these 2 lines:

[assembly: AssemblyKeyFileAttribute(@"blah\blah.snk")]
[assembly: AssemblyDelaySignAttribute(true)]

inside my assemblyinfo.cs destroyed the designer after a build. Removing them and rebuilding finally fixed the problem. Why in the world would delay signing an app cause VS.net to not recognize any custom control or resource file until runtime? Who knows, but after a wasted day, at least my projects load now. If delay signing is causing your problems, comment out those lines till you are ready to release.

vsdotnethatesme  Monday, April 28, 2008 2:31 AM

Ifound this solution on some website, cannot find it now. Close all the desinger forms in Visual Studio. Close Visual Studio. Delete all the 'bin' and 'obj' files of all projects in your solution. Relaunch Visual studio and load the project, rebuild it and you can now should be able to see the designers.

The above instructions worked for me. Thank you!

aamjohns  Friday, September 26, 2008 4:38 PM
pankaj chaudhari wrote:

I found this solution on some website, cannot find it now.

Close all the desinger forms in Visual Studio. Close Visual Studio. Delete all the 'bin' and 'obj' files of all projects in your solution.

Relaunch Visual studio and load the project, rebuild it and you can now should be able to see the designers.

This worked for me! Thanks!!

shapij  Thursday, October 23, 2008 7:37 PM

Hi ev1,
Just see the warnings after rebuildon the file and u will get hint that where u r doing worng .

Regards,
Sameeullah Daris

samee_dars  Sunday, September 13, 2009 10:53 AM

You can use google to search for other answers

Custom Search

More Threads

• datagrid in winforms (vb.net)...
• Sharing images
• Retrieving the ExtenderProvider from within the EditValue method of a UITypeEditor
• Troubles with collection editor and componentmodel
• How to set up User Preference in Winform App.
• "ICO.ICO" - Icon Help
• Tips for creating a modern gui
• What service does the datagrid use to create tablestyles
• Loading form ...
• User control doubt