Home Dashboard Directory Help
Search

VS 2010 WinForms Designer View crashed opening a form/control by Sergey Lepskiy


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


1
0
Sign in
to vote
Type: Bug
ID: 771588
Opened: 11/19/2012 4:33:10 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

I have VS 2010 WinForms solution that was converted from VS 2003 some years ago, but was working correct. After installing Visual Studio 2012 RC the Designer View began to crash while open a form/user control. The error appears:

To prevent possible data loss before loading the designer, the following errors must be resolved: Object reference not set to an instance of an object.

Call stack:
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.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.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)
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)

I found some solutions of the problem on the internet, however nothing helped me:
1) Restarted VS (even with deleting obj & bin folders in all projects);
2) Updated all resource files (using Resgen.exe tool);
3) Checked a path to the project folder for existence of "&" (ampersand) in it;

Designer View was successfully opened on machines where VS 2012 is not installed. Also I noticed that only forms/user controls are crashed that inherit some overridden class (not Form / UserControl) or contain some overridden control on it.
Details
Sign in to post a comment.
Posted by Microsoft on 12/13/2012 at 3:49 PM
Hi Sergey -

We cannot reproduce your issue. Please determine whether you can reproduce your issue on another machine or (preferably)a clean machine with a fresh installation of Visual Studio.

- The Windows Forms Team
Posted by RodGMatthews on 12/12/2012 at 12:52 PM
Did you ever resolve this issue?

I have encountered this error many times a day for a year or so now. Initially with VS 2010 & now with VS 2012. The error occurs when opening a form or user control in design view. It always says ' 1 Error - value does not fall within the expected range'. Nine times out of ten if I restart VS it will open the form or user control without any error. Occasionally I have to restart VS several times to clear the problem. It does not seem to be specific to any form - just happens at random.

I've spent many hours googling it but have never found an answer.

Thanks.

Rod Matthews
Posted by Microsoft on 11/28/2012 at 11:56 AM
Thank you for your feedback.
Unfortunately, we were unable to reproduce the bug with the scenario and steps provided.

What version of the .Net Framework is your project targeting? Would you be able to share a simplified project which reproduces this error?
You mentioned that this is an RC build of VisualStudio, does this crash reproduce on an RTM version?
Are other versions of VisualStudio installed on this machine?

What is the file version of System.Design.dll assemblies, under
C:\Windows\Microsoft.NET\Framework\v4.0.30319
And under
C:\Windows\Microsoft.NET\Framework\v2.0.50727
You can look up file version in file explorer when viewing file properties.
Please search for microsoft.visualstudio.design.dll assembly from c:\windows and share file versions of all instances your find.

Thanks,
The Windows Forms Product Team
Posted by Microsoft on 11/21/2012 at 10:29 PM
Thanks for your feedback. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 11/19/2012 at 9:59 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 11/19/2012 at 10:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.