Error opening design view in vs2005

Hi people.

I've just upgraded to vs2005 (pro downloaded from msdn) and after converting my solution with 4 vb projects in I'm unable to view any of the forms in the designer.

The projects and solution compiles and run just fine but no luck in design view.
The error message I'm getting is:

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.

Object reference not set to an instance of an object.

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



Can someone please help me


Regards

Harry Solsem
Umoe Mandal AS
Norway



Answer this question

Error opening design view in vs2005

  • Warrenjsr

    I get this problem as well, and in my case the form is in C#.

    Any help here Microsoft

  • Arror

    Yea, as Jay said, this will solve your problem. And here is the link to my blog for the same:
    http://geekswithblogs.net/rupreet/archive/2005/12/14/63116.aspx

    Hope this helps!

    -Rupreet


  • Feras911

    I have exactly the same problem. Have you find any solution

    Thanks
    Regards

  • Christoph Spallek

    I have the same issue as well in a C# project with several user controls.  Funny, losts of projects converted, but the one particular project won't build or show in the designer.  Any help would be appreciated.
    -Jason

  • JR38391

    Well ... it's not a surprise: I have the same issue.
    I've also try to create a new project and to add all forms but it doesn't solve the problem.

    I've thaught it was due to inheritence between form. Because for one form, breaking the inheritance was solved the issue... but it was yesterday: today it does not solve it.... perhaps tomorrow Tongue Tied
    I've then thaught it was due to a custom control, when the IDE tries to instanciate it. I just have a myTextBox control which inherit from TextBox ... but the same user control just work perfectly in another project.

    And finally I have two forms which don't inherit from another and which don't use custom controls ... and those two forms just bring the same error message in the IDE.

    Of course, I can compile and run the project ...

  • LarryBiStack

    I have found a solution to the this issue. This might not be applicable to all cases. In my application which was built in VS 2003 i had couple of Resource Files (.resx) and after porting the application to VS 2005 i found this issue of error in opening the designer view for the windows forms.

    Solution:
    Run custom tool (ResXFileCodeGenerator) on the resource files in your application by settting the "Custom Tool" property of the resource file. If the resource file has a valid schema (Valid as per v2.0) then the tool will create a "Designer" file for it for example for a "sample1.resx" it will create a "sample1.designer.cs". This "Designer" file will not be created incase if your resource file has some missing tags. For example in my case it had something like this

    <data name="lblMainMenu"></data>

    If you notice that the "<value>" tag is missing thus it failed to create the "Designer" class for it. After the resource file is rectified (added missing tags) i found that all of the forms are able to open in the designer view.

    Interesting thing to notice here is that in v1.1 it was working but in v2.0 because of changes made to the way resource files are used and validated this issue popped up. Thus i want to make a point here that

    "While migrating applications from VS 2003 to VS 2005 this thing should have been taken care of. Atleast it should display some error info about the invalid resource file in the Conversion Log".

    I hope this should be taken up by the Visual Studio Team future improvement.

    I would also like to mention here that this solution that resolved issue in my application was done by one of my collegue "Rupreet" a.k.a RPG the Great.

    I hope this helps others in resolving the issue in their application.

    This post also answers to my question posted about the issue at:
    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=164193&SiteID=1


    -Jay


  • shone xiao

    Can we have someone from the Windows Forms team answer this

    -Jay

  • will_affinity

    I had exactly the same problem.
    I think the problem is in procject file (.csproj).
    After hours of trying to fix it, I opened a new project and manually add all forms and classes to new project.

    New project works just fine IdeaBig Smile

    nikola

  • Error opening design view in vs2005