VS2010 / Silverlight设计师未处理异常

时间:2012-10-26 02:30:49

标签: visual-studio-2010 silverlight designer

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

1 个答案:

答案 0 :(得分:0)

当我遇到这种情况时,这意味着我在代码中破坏了某些东西。设计人员实际上是在运行Silverlight代码以生成预览 - 因此这是首先要调查的内容。

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

我花了很多时间与Silverlight 5和VS2010设计师合作,所以我认为那里没有根本问题。