2012-10-26 19 views
0

我安装了VS2010 10.0.30319.1 RTMRel和Silverlight 4。VS2010/Silverlight设计器未处理的异常

让我清楚地说明我已经在几个没有任何设计师问题的项目上工作过。

我不记得有任何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() 

回答

0

当这发生在我身上时,这意味着我已经在代码中破坏了某些东西。设计人员基本上正在运行您的Silverlight代码以生成预览 - 所以这将是首先要进行调查。

其次 - 这是发生在你看Silverlight Xaml的时候吗?如果创建一个新的Silverlight项目,你是否仍然会遇到同样的问题。如果是这样的话,那么你已经搞乱了你的安装。

我已经花了很多快乐时光的Silverlight 5和VS2010设计师,所以我不认为这是有一个根本性的问题。

+0

感谢您的评论马丁。正如我所提到的,甚至当我创建一个全新的项目,设计师将不会加载。我没有对VS/silverlight安装本身做任何事情。我不得不承认,直到昨天,我还没有和他们一起工作过。 – xyk