在 Visual Studio 2010 中的所有 Silverlight 业务应用程序中,始终在设计器中看到 NullReference 异常 [英] Always see NullReference exception in designer with all silverlight business applications in visual studio 2010

查看:70
本文介绍了在 Visual Studio 2010 中的所有 Silverlight 业务应用程序中,始终在设计器中看到 NullReference 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从最简单的案例开始.

如果我按文件->新项目->silverlight 业务应用程序",它会打开 MainPage.xaml,显示附加在本文底部的消息.

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.

它也对 sourcesafe 中存在的任何 Silverlight 业务应用程序执行相同的操作 - 这是我个人第一次需要使用该技术.

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.

提前致谢.

发生了未处理的异常

单击此处重新加载设计器

Click here to reload the designer

详情:

System.NullReferenceException 未将对象引用设置为实例的一个对象.在Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.d__8.MoveNext()在MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
在MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(标识符标识符)在MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScopeparentScope、IParseContext 上下文)在MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement 父级,PrefixScope parentScope、IParseContext 上下文、IMarkupSourceProvider提供者)在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(BooleanconvertToXamlWithErrors) 在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()在Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()在Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()在 MS.Internal.Host.PersistenceSubsystem.Load() 在MS.Internal.Host.Designer.Load() 在MS.Internal.Designer.VSDesigner.Load() 在MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() 在MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView查看)在MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory工厂,IsolatedView 视图)在MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory工厂,IsolatedView 视图)在MS.Internal.Host.Isolation.IsolatedDesigner.Load() 在MS.Internal.Designer.DesignerPane.LoadDesignerView()

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

推荐答案

如果您在您的电脑上安装了 Visual Studio 2011 开发者预览版,就会发生这种情况.

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

要解决此错误,请关闭 Visual Studio 和您的浏览器.卸载silverlight(无需卸载sdk,只需silverlight 本身即可).

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.

这篇关于在 Visual Studio 2010 中的所有 Silverlight 业务应用程序中,始终在设计器中看到 NullReference 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆