【问题标题】:VS2010/Silverlight designer unhandled exceptionVS2010/Silverlight 设计师未处理的异常
【发布时间】:2012-10-16 07:25:26
【问题描述】:

我已经安装了 VS2010 10.0.30319.1 RTMRel 和 Silverlight 4。

让我明确表示,我参与过多个项目,没有任何设计师问题。

我不记得曾经使用过 VS 或 Silverlight 4,但是今天当我打开一个项目并尝试调整我的 Web 应用程序的 UI 时,设计器无法加载。我创建了一个新项目,同样的事情发生了。下面是例外。任何帮助将不胜感激。

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

【问题讨论】:

    标签: visual-studio-2010 silverlight designer


    【解决方案1】:

    当这种情况发生在我身上时,这意味着我破坏了代码中的某些内容。设计器实际上是在运行您的 Silverlight 代码以生成预览 - 所以这是首先要调查的事情。

    其次 - 当您查看任何 Silverlight Xaml 时,是否会发生这种情况?如果创建一个新的 Silverlight 项目,你还会遇到同样的问题吗?如果是这种情况,那么您已经以某种方式搞砸了您的安装。

    我在 Silverlight 5 和 VS2010 设计器上度过了许多快乐时光,所以我认为这不是根本问题。

    【讨论】:

    • 感谢您的评论马丁。正如我所提到的,即使我创建了一个全新的项目,设计器也不会加载。我没有对 VS/silverlight 安装本身做任何事情。我不得不承认,直到昨天我才和他们合作了一段时间。
    猜你喜欢
    • 1970-01-01
    • 2011-12-31
    • 1970-01-01
    • 1970-01-01
    • 2011-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多