2012-11-21 130 views
5

我想在Windows 7上的Visual Studio 2010中設置新的Windows窗體應用程序(C++/CLI)。每當我嘗試打開設計器,它失敗,出現此錯誤無益:異常從HRESULT:0x8CE00001當打開Visual Studio 2010設計器

Exception from HRESULT: 0x8CE00001 

Instances of this error (1) 

1. Hide Call Stack 

at Microsoft.VisualStudio.Designer.Interfaces.IVSMDCodeDomProvider.get_CodeDomProvider() 
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_Provider() 
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit() 
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload) 

如果我調試的Visual Studio和CLR例外打破,它實際上引發此異常第一:

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualStudio.Design.dll

Additional information: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

有了這個調用堆棧:

> Microsoft.VisualStudio.Design.dll!Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.VerifyNestedDocDataCompatible() + 0x15d bytes 
    Microsoft.VisualStudio.Design.dll!Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.Microsoft.VisualStudio.Designer.Interfaces.IVSMDDesignerLoader.Initialize(object pSp, object pHier, int itemid, object punkDocData) + 0xb5 bytes 
    [Native to Managed Transition] 
    vcpkg.dll!CVCFormEditorFactory::CreateEditorInstance() + 0x2e49f bytes 
    msenv.dll!CVsUIShellOpenDocument::OpenSpecificEditor() + 0x784 bytes 
    VCProject.dll!CVCFileNode::OpenSpecificEditor() + 0xc6 bytes 
    VCProject.dll!CVCFileNode::OpenSpecificEditor() + 0x3a bytes 
    VCProject.dll!CVCFileNode::DoOpenFile() + 0x1fe bytes 
    VCProject.dll!CVCFileNode::DoDefaultAction() + 0x5b bytes 
    VCProject.dll!CVCArchy::ExecCommand() + 0x8c bytes 
    msenv.dll!CVsUIHierarchyBaseWin::ExecHierParentChain() + 0x85 bytes  
    msenv.dll!CVsUIHierarchyBaseWin::WinExecCommand() + 0x7d bytes 
    msenv.dll!CVsUIHierarchyBaseWin::ProcessLButtonDblClkMsg() + 0xd8 bytes  
    msenv.dll!FnwpTVFixer() + 0x76b49 bytes  
    [email protected]() + 0x23 bytes 
    [email protected]() + 0xb7 bytes 
    [email protected]() + 0xed bytes 
    [email protected]() + 0xf bytes 
    msenv.dll!ProcessMessage() + 0x4d bytes  
    msenv.dll!CMsoCMHandler::EnvironmentMsgLoop() + 0x87 bytes 
    msenv.dll!CMsoCMHandler::FPushMessageLoop() + 0x79 bytes 
    msenv.dll!SCM::FPushMessageLoop() + 0x8c bytes 
    msenv.dll!SCM_MsoCompMgr::FPushMessageLoop() + 0x2a bytes 
    msenv.dll!CMsoComponent::PushMsgLoop() + 0x28 bytes  
    msenv.dll!VStudioMainLogged() + 0x22a bytes  
    msenv.dll!_VStudioMain() + 0x78 bytes 
    devenv.exe!util_CallVsMain() + 0xdb bytes 
    devenv.exe!CDevEnvAppId::Run() + 0x693 bytes 
    [email protected]() + 0x9c bytes 
    devenv.exe!operator new[]() + 0xb31c bytes 
    [email protected]@12() + 0x12 bytes  
    [email protected]() + 0x27 bytes 
    [email protected]() + 0x1b bytes  

這是一個乾淨的新項目(文件→新建→項目...→Visual C++→CLR→Windows窗體應用程序)。在我創建一個新項目後,打開自動生成的Form1.h會導致錯誤,而不是設計器。但是,如果我創建的是C#Windows Forms應用程序而不是C++/CLI,則它工作正常。

關於如何解決此問題並打開設計器的任何想法?我已經嘗試了所有的以下無濟於事的:

  • 重新安裝VS 2010 SP1
  • 運行Windows更新,其中安裝了兩個VS相關的更新( 「更新爲Microsoft Visual Studio 2010的Service Pack 1(KB2736182)」 和「更新爲Microsoft Visual Studio 2010和工具爲Office運行時(KB2764593)」)
  • 安裝KB2635973,它修復了一個外觀類似的問題
  • 重新引導安裝上述
  • 在關閉所有的DirectX調試/驗證設置後DirectX的控制面板
  • 通過卸載在其名稱中帶有「Microsoft SQL Server壓縮」什麼「程序和功能」控制面板

我已經發現了幾個類似的線程在線(onetwothree) ,但他們都沒有結果,或者沒有爲我工作。我還沒有嘗試完全重新安裝Visual Studio,但我可能不得不嘗試下一步。

回答

1

經過多次的努力和重新安裝,我相信這是一個Visual Studio擴展的問題。

完全卸載Visual Studio(即使與VS2010_Uninstall-RTM.ENU.exe /full /netfx),並重新安裝它沒有幫助。但是,如果我創建了一個新的Windows用戶,那麼對於該用戶來說,它工作得很好。同樣,如果我的HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config註冊表項(及其子項)被破壞,它就會起作用。

經過艱苦地比較我舊的註冊表(它給出了錯誤)和新註冊表(它工作的地方)並協調它們之後,唯一的區別是與特定的VS擴展相關。由於我不再需要擴展名,因此我不需要它的註冊表項,因此如果沒有它們,設計師會按預期工作。

+0

我可以確認我有同樣的問題,它與VS擴展有關。我卸載了擴展管理器中的所有非必需品,重新啓動了VS,問題消失了。 – Henrik

2

我已經成功地通過設置固定的問題:

tools -> options -> textEditor -> C++ -> Advanced -> "Disable DataBase"

(當出現DisableDataBase == true的HRESULT錯誤),比重新啓動的VisualStudio。

+0

爲VS2012工作。 –

+0

謝謝 - 這也適用於我 –

0

我正在在VS2013

這個錯誤是什麼解決這對我來說是

  • 刪除使用以管理員身份運行的預編譯頭文件
  • 重新開放VS
  • 重建解決方案

之後我不再收到錯誤,希望這個hel ps某人。

0

我在Visual Studio 2012中解決了這個問題。我的項目位於Dropbox目錄中,並且從hresult 0x8ce00001問題的異常在那裏,直到我將項目移動到我的桌面。我認爲Dropbox的版本控制活動可能與這個問題有關。我希望這可以幫助別人!

0

我解決了這個問題,只安裝了SQL Server Compact 3.5。

注意,也許您的項目需要4.0版本。

相關問題