Silverlight应用程序中的MainPage错误

时间:2013-08-20 11:21:52

标签: silverlight silverlight-5.0

  

我是Silver Light应用程序的新手。当我尝试创建一个silverlight应用程序时,我在主页设计器中出现错误

    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()

任何人都可以为我提供解决方案。我使用的是Silverlight 5,VS 2010,.Net Framework 4

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

  

亲爱的所有

     
    

我花了好几个小时安装和卸载不同版本&gt;&gt; of silverlight后找到了解决方案。

  
Follow the Steps for the solution

Step1: Uninstall all the things related to Silverlight
Step2: Install the Silverlight4.0
Step3: Install Silverlight3 SDK
  
    

现在打开项目,浏览器可能会有机会询问最新的Silverlight版本。 &gt;&gt;但忽略这一点。