Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception from HRESULT: 0x8CE00001 when opening Visual Studio 2010 Designer

I'm trying to set up a new Windows Forms Application (C++/CLI) in Visual Studio 2010 on Windows 7. Every time I try to open up the Designer, it fails with this unhelpful error:

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) 

If I debug Visual Studio and break on CLR exceptions, it actually throws this exception first:

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))

With this call stack:

>   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    
    user32.dll!_InternalCallWinProc@20()  + 0x23 bytes  
    user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 bytes  
    user32.dll!_DispatchMessageWorker@8()  + 0xed bytes 
    user32.dll!_DispatchMessageW@4()  + 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   
    devenv.exe!_WinMain@16()  + 0x9c bytes  
    devenv.exe!operator new[]()  + 0xb31c bytes 
    kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes    
    ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes   
    ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes    

This is with a clean, new project (File → New → Project... → Visual C++ → CLR → Windows Forms Application). After I create a new project, opening up the autogenerated Form1.h results in the error instead of the Designer. However, if I create a C# Windows Forms Application instead of C++/CLI, it works fine.

Any ideas on how I can solve this problem and open up the Designer? I've tried all of the following to no avail:

  • Reinstalling VS 2010 SP1
  • Running Windows Update, which installed two VS-related updates ("Update for Microsoft Visual Studio 2010 Service Pack 1 (KB2736182)" and "Update for Microsoft Visual Studio 2010 Tools for Office Runtime (KB2764593)")
  • Installing KB2635973, which fixes a similar-looking issue
  • Rebooting after installing the above
  • Turning off all DirectX debugging/validation settings in the DirectX Control Panel
  • Uninstalling anything with "Microsoft SQL Server Compact" in its name via the "Program and Features" control panel

I've found a few similar threads online (one, two, three), but they've all been inconclusive or not worked for me. I've not yet tried fully reinstalling Visual Studio, but I may have to try that next.

like image 547
Adam Rosenfield Avatar asked Oct 22 '22 01:10

Adam Rosenfield


1 Answers

I have successfully fixed the problem by setting:

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

back to false (when DisableDataBase == true the HRESULT error appears), than restarting VisualStudio.

like image 179
Sanyol Avatar answered Oct 31 '22 00:10

Sanyol