0

我安装了 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()
4

1 回答 1

0

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

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

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

于 2012-10-26T08:46:16.867 回答