I have a problem debugging a project migrated from Visual Studio 2010 to 2012. Every time I go to debug it I get the error message:
"Error HRESULT E_FAIL has been returned from a call to a COM component".
Compiling and running the application in a local IIS server works fine - just cannot debug.
The other change other than moving to VS2012 is I am now using Team Foundation Server for source control and issue tracking - but I cannot see how that would affect it.
I can narrow it down to the following
- The project file - it has been migrated from VS 2003 as a website project and has been chopped and changed up the different versions
- Crystal Report runtime library/ some other library
Anyone with any ideas?
I removed the csproj.user files and it worked for me.
In some other cases, to fix this error, I go to Web tab in the project properties and check "Use Visual Studio Development Server" and "Auto-assign Port". After that I need to rebuild the project and restart VS
This happens in our TFS build server some times (Gated check in). It is about workspace folder. I don't know why but workspace folder access sometimes corrupt. What I am doing to fix issue is deleting TFS build workspaces and deleting relevant workspace folders. TFS build machine then create new workspaces for itself and problem is fixed.
Tousif Ahmed's solution should work for local builds. Copy application folder to another place should do the same thing what I am doing in TFS build machine.
I fixed the same issue by deleting ComponentModelCache folder
%APPDATA%/..
and press enterC:\Users\\AppData
Local\Microsoft\VisualStudio\<version>
where is 12.0 for Visual Studio 2013.From here: http://withmartin.net/how-visual-studios-component-model-cache-can-be-a-pain/
Not sure about the exact reproduction steps for the error (HRESULT E_FAIL has been returned from a call to a COM component), but the solution for me was:
After the restart, the error was gone.
Sorry to revive a dead thread but i solved this on VS2017 by deleting the project template cache and item template cache folders in
Then resetting the visual studio settings via
Also ive heard turning off "Lightweight solution load for all projects" can help.