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.
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.
After much nuking and reinstalling, I believe this to have been a problem with a Visual Studio Extension.
Completely uninstalling Visual Studio (even with VS2010_Uninstall-RTM.ENU.exe /full /netfx) and reinstalling it didn't help. But, if I created a new Windows user, it worked fine for that user. Similarly, if I nuked my HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0 and HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config registry keys (and their subkeys), it worked.
After painstakingly comparing my old registry (where it gave the error) with a fresh registry (where it worked) and reconciling them, the only differences that remained were related to a particular VS extension. Since I no longer need that extension, I don't need its registry keys, so without them, the Designer is working as expected.
I was getting this error in VS2013
what resolved it for me was
Deleting the Pre Compiled Header file
Reopening VS using Run as Administrator
Rebuilt the solution
Afterwards i was no longer receiving the error, hopefully this helps someone.
I resolved this issue in Visual Studio 2012. My project was located in a Dropbox directory and the Exception from hresult 0x8ce00001 issue was there until I moved the project to my Desktop. I assume that Dropbox's versioning activities may have had something to do with the issue. I hope this might help someone else!
I resolved this problem only installing the SQL Server Compact 3.5.
Attention, maybe your project needs the version 4.0.
Build -> Clean Solution.
Close Visual Studio and reopen.
This resolve my problem.
This question is old, but as the solution I found in VS 2017 is very simple, I decided to publish it. For me, this problem started when I switched from Debug X86 to Debug X64 and then back to X86. As I did not realize at what moment the problem came up, I wasted enormous time looking for the solution. But simply when I returned to Debug X64 the problem disappeared...
Related
Visual studio 2013 is randomly crashing after I updated it to 5 RTM.
I found that crashing doesn't happen in safemode. And I found abnormal memory behavior of Visual Studio 2013, and it seem it is related to crashing.
I checked the memory usage of the Visual Studio with VMMAP program, and it showed the memory usage is abnormally increasing. This image was captured during I just loaded a c# wpf application and leave it (I didn't do anything with the Visual Studio). Also CodeLens was turned off.
It just increased and crashed just after the memory usage met about 3.5 GB (it seems like the maximum memory size 32bit application can use). The graph shows the heap usage is the most contribution to the total memory usage increasing (this is why I say possible 'memory leak').
VMMAP Graph
These are the plugins installed on Visual Studio (most of them came with the initial Visual Studio installation).
Plugins List
Anybody have any ideas to tackle this problem?
Thank you.
I think I just have found a solution.
Source Control is the problem.
I just set
Options -> Source Control -> Current source control plug-in -> None
(It was Microsoft Git Provider.)
The memory usage dropped down drastically.
It seems like that Microsoft Git Provider has some issues.
I noticed a strange issue today with Visual Studio (2010,2012,2013). Some of the modules are missing, not just symbols, but they are not present at all in the Modules window. When I check the count that VC is showing - exactly 500... Is it really possible, VC has a limit and it's so low?
I came across this exact issue today. Visual studios has a hard limit of 500 modules. I am not sure of the reason. Here they describe a way to raise the limit by adding a registry key.
Add this key to your registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
DWORD DebuggerMaxModuleMsgs = 2048
When loading a C# / .NET 4 project into VS 2010 Ultimate on my main machine (Win 7 ultimate 64 bits), I am getting the error message
Attaching the ProteusDebugEngine debugger to process '[XXXX] YYYY.vshost.exe'
on machine ZZZZ failed. The debugger is not properly installed.
Cannot debug the requested type of code.
Run setup to install or repair the debugger.
This only happens when I set the target to 'Any CPU' or 'x64'; I don't get this message for a x86 target.
I have already uninstalled and reinstalled VS 2010 two times, and also have tried a repair. Manually re-registering oleaut32.dll does not help either.
When installing VS 2010 Ultimate on my notebook (Win 7 home premium 64 bits), I do not get this error message at all.
Both machines have a pretty similar software setup. There is also VS 2010 Express installed on both machines, and I do not get this error with it on any of the two computers either.
Help on this would be greatly appreciated.
Recently I encountered this problem too, but in addition to it I also faced with another error message box showing up in SQL Server Management Studio when I tried to connect to a server, which says:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider' ...
so this time I googled for this error and found a solution which I found at below urls:
Martin Poon - Microsoft MVP blog - Unable to cast COM object of type ...
Stack Overflow - Unable to cast COM object of type 'System.__ComObject' to ...
So it seems those problems happen when you have installed new version of Internet Explorer on your windows manually or using windows update.
in my case it's related to installing the IE9 using windows update on my Windows 7 x64 which has been resolved by following the instruction at above urls.
or in short:
open Command Prompt as Administrator and execute below command(s):
regsvr32 "C:\Program Files\Internet Explorer\ieproxy.dll"
for 64 bit windows, also try this:
regsvr32 "C:\Program Files (x86)\Internet Explorer\ieproxy.dll"
and voila both problems just faded away :-)
Had the same message popping up after I installed Visual Studio Ultimate 2010 on a new system. I had pulled the source from tfs and everything compiled. The configuration had been set to Any CPU for each project, however the setting up top was "Mixed", once I set the overall type to AnyCPU and cleaned the solution, it started fine in the debugger.
Running the following in the Visual Studio Command Prompt (2010) solved this for me.
devenv /resetskippkgs
In my case this helped:
1. Open preferences of the project
2. Unchecked "Prefer 32 bit" in Platform targets section from a build tab.
I'm building a project in Visual Studio 2010 and the build fails because it cannot copy the assemblyname.dll file from obj to bin folder. The exact error message is:
Error 7
Unable to copy file "obj\Debug\AssemblyName.dll" to "bin\AssemblyName.dll". The requested operation cannot be performed on a file with a user-mapped section open.
I think this is because the previous file in bin-folder is not accessible. When I try to delete the file manually, I get an error "The action can't be completed because the file is open in another program". If I try to see what application locks the file with Unlocker, I don't get any results (No Locking handle found).
If I restart Visual Studio, the error goes away but happens again after a build or two. Goes without saying that this is seriously slowing me down. Any advice how to start solving this?
VIsual Studio 2012 on Windows 8. I was receiving the same error message on my project. Restarting Visual Studio or cleaning the obj folder manually did not help. Finally I closed all open files (Windows -> Close All Documents) and the problem went away.
This behavior was due to a newly installed Visual Studio extension called Visual Studio Achievements (http://visualstudiogallery.msdn.microsoft.com/bc7a433b-b594-48d4-bba2-a2f24774d02f)
I noticed that the .pdb file was locked by FxCop (using Unlocker) and I think that the Achievements -extension uses it. After disabling the extension I've no longer got the error mentioned above.
This bug has been fixed in recent versions of the extension (>1.7). It was released as a beta, btw...
This behavior of VS happen very often even on my computer (and on computers of my coworkers).
In my experience it happen more frequently when:
I have some form opened in design when i compile
I stop the execution od the application by pressing the "stop" button
in VS instead of exiting the application
So, closing the form in design before compile, and exiting the application instead of stopping it, somewhat mitigate the issue... but it still happen :-|
My computer is Win 7 x64 SP1 with VS 2010 SP1, 8Gb ram, and no swap file
Platform: Windows 8 Pro, Visual Studio 2012
I found that I receive this error when I am accessing the folder in Windows Explorer.
I was creating PDF documents with Visual Studio 2012. To review the sample document I would right click in Solution Explorer and use Open Folder in File Explorer.
On Windows 7 I would get a SYSTEM.IO error if the actual PDF document was open in Adobe Reader which is expected. With Windows 8 I found that I receive the above error if I have the folder open. I suspect there is a conflict with the Windows 8 preview.
If I close the folder and run the program it works fine.
Check if you open the dll in visual studio.
I open the dll in visual studio and this error happen!!
Howdy, I noticed that Visual Studio crashed when I tried to open a .SQL file. Perhaps this was due to me installing SQL SERVER 2008 last week. Anyway to overcome the issue I repaired Visual Studio using the install disc. One hour later and a couple of reboots the issue remained. However now the thing crashes as soon as I select a project!
Here's what the event viewer says:
EventType clr20r3, P1 devenv.exe, P2
10.0.40219.1, P3 4d5f2a73, P4 microsoft.visualstudio.editor.implementation,
P5 10.0.0.0, P6 4d5f2b24, P7 d2, P8
9a, P9 system.nullreferenceexception,
P10 NIL.
I'm starting to lose the will to live.
With Regards to Andrei Drynov's answer / comment **
Okay, the service pack is on there, the contents of the SQL file are irrelevant as the files opened with ease previously and it happens on that file type not a specific file also the crashing happens regardless of the project/solution I select? I do agree that I am being dramatic!
After starting in safe mode **
I got the following error
"An exception was encountered while
constructing the content of this
frame. This information is also
logged by running the application with
the /log parameter on the command
line, which stores results in
"C:\Documents and
Settings\XXXXXXX\Application
Data\Microsoft\VisualStudio\10.0\ActivityLog.xml".
Exception details:
System.UnauthorizedAccessException:
Package
'Attrice.TeamFoundation.Sidekicks.VisualStudio.MainPackage,
Attrice.TeamFoundation.Sidekicks.Package.10,
Version=3.0.3.1, Culture=neutral,
PublicKeyToken=14bece0700b6dc89'
failed to load. at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo) at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode) at
Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at
Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
I then got the following
Microsoft Visual Studio
'C:\Dev\XXXXXX.Deploy.wdproj'
cannot be opened because its project
type (.wdproj) is not supported by
this version of the application.
To open it, please use a version that
supports this type of project.
So I'll reinstall the Visual Studio® 2010 Web Deployment Projects to see if that works? How odd.
This worked a treat!
Thank God!
Visual Studio 2010 hangs up when opening a .sql file
You are being quite dramatic )))
Please provide more information, e.g. post the SQL file contents, tell more about the project type, etc.
BTW, did you install service pack 1?
I had a VS2010 solution with two Database projects that, on and off, crashed VS2010 on opening.
After a few attempts I noticed that the .SLN file had the two projects correctly referenced BUT the TAG SccNumberOfProjects referenced 3 instead of 2.
Global\GlobalSection\SccNumberOfProjects = 3
I "text-edited" for 2 and it worked, at least for now.
As the crash was happening on and off with no apparent reason, I cannot guarantee that this was in fact THE solution; use at your own risk and of course, backup files first. ;)