codingbiz
codingbiz

Reputation: 26386

Why do I have "Object reference not set to an instance" in new project page

I just updated my Visual Studio from Silverlight 3 to Silverlight 4 and started having this unusual error message.

enter image description here

No matter how many project I created it's the same. Restarted Visual Studio and my machine, still the same thing

Update: I have copied the stack trace from the image

System.NullReferenceException
Object reference not set to an instance of an object.
   at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>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()

Upvotes: 0

Views: 2309

Answers (2)

codingbiz
codingbiz

Reputation: 26386

I solved this by installing the Silverlight 4 runtime. Whenever you click on the suggested prerequisite update link in Visual Studio, the latest version is installed, which is currently Silverlight 5 runtime which was not what I wanted. It would be fine if we could be given option to choose which to install instead of installing a latest version that breaks stuffs.

I uninstalled Silverlight 5 runtime and used these links to resintall version 4

Here are the links I used:

Suggested by this answer

Upvotes: 1

Jignesh.Raj
Jignesh.Raj

Reputation: 5987

This Error Raise when You Reference Of Old Version So You Should Add New Reference For You Updated Version

Upvotes: 0

Related Questions