所以,我明白了
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 项目时出错。 文件 > 新建 > 项目 > Visual C# > Silverlight > Silverlight 应用程序。
“在新网站中托管 silverlight 应用程序”已禁用
Silverlight 版本:4
我的笔记本电脑上没有这个问题,它的安装与我的家用电脑完全相同。
出了什么问题?我该如何解决这个问题?
ps..此错误出现在我打开的任何 silverlight 项目中。它是否是我已经在开发的一个新的。
[更新]
但是如果我安装了silverlight 5,当我开始一个新项目时,我是否不能选择这个?我还是只能选择Silverlight 3和Silverlight 4。
此外,正如您提供的链接中所述,我的“程序和功能”中没有 siverlight 5。
但是,在谷歌上搜索如何检查 silverlight 版本..我被发送到寄存器以检查 silverlight 的版本 key 。
key 显示我的版本是:5.1.10411.0
如果我的程序和功能中没有 silverlight 5,如何删除 silverlight 5?
最佳答案
这可能是由于将 silverlight 升级到版本 5 引起的。引用自 social.msdn.microsoft.com :
It seems you upgraded your version of silverlight to Silverlight 5. if so you may need to Uninstall silverlight 5 and 4 then Install SilverLight 4 developer runtime at http://go.microsoft.com/fwlink/?LinkID=188039.
另请参阅here
关于c# - System.NullReferenceException 未将对象引用设置为对象的实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11015170/