2012-10-26 18 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