Saturday, September 15, 2012

Always see NullReference exception in designer with all silverlight business applications in visual studio 2010

Always see NullReference exception in designer with all silverlight business applications in visual studio 2010

Starting with the most simple case.

If I press "File->new project->silverlight business application" it opens up to MainPage.xaml saying the message attached at the bottom of this post.

It also does the same thing to any silverlight business application that exists in sourcesafe - this is the first time I've personally needed to work on this technology.

Any advice would be very much appreciated I really need to get started on a project and I feel quite disabled to not have the designer.

Thanks in advance.

An Unhandled Exception has occured

Click here to reload the designer

Details:

System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.d__8.MoveNext() at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() at MS.Internal.Host.PersistenceSubsystem.Load() at MS.Internal.Host.Designer.Load() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView()

Answers & Comments...

Answer: 1

This happens if you have installed visual studio 2011 developer preview on your pc.

To resolve the error close visual studio and your browsers. Uninstall silverlight (no need to uninstall the sdk just silverlight itself).

Then re-open your project. Follow the instructions and it'll be working just fine.

by : Paul Hutchinsonhttp://stackoverflow.com/users/413712

Answer: 2

If you run into this issue, a possible cause is due to you having Microsoft SilverLight version 5.0 installed on your pc versus that of 4.0 (Version: 4.0.50826.0). Remove the copy of SilverLight 5.0. Install the version located at the following link - http://go.microsoft.com/fwlink/?LinkId=146060 DO NOT INSTALL version 5.0 IF YOU HAVE SDK 3 AND 4. INSTALL MICROSOFT SILVERLIGHT 4.0

by : Marvin Blandhttp://stackoverflow.com/users/1156987

Answer: 3

it might be because of your application is developed on Silverlight 5 and you are opening it with the machine having silverlight 4. i am just giving example of 5 and 4. or might be you have not installed the SDK pack of it.

by : Vikrant Morehttp://stackoverflow.com/users/1004164




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog