VS2010 DBProj fails on build machine with 'Error HRESULT E_FAIL has been returned from a call to a COM component'
-
Friday, October 01, 2010 5:01 PM
Using VS2010 RTM I've got a fairly simple DBProject (along with other projects in the same solution). All works fine and it builds on my machine but when it gets built on our build servers they are all failing with this error:
---
Microsoft (R) Visual Studio Version 10.0.30319.1. Copyright (C) Microsoft Corp. All rights reserved. The project 'Schema.dbproj' will close once model building has paused. Serializing the project state for project 'Schema.dbproj'... Project `Schema.dbproj' was successfully serialized to file 'c:\source\Schema\Schema.dbmdl'. c:\source\Schema\Schema.dbproj : error : Error HRESULT E_FAIL has been returned from a call to a COM component. One or more projects in the solution were not loaded correctly. Please see the Output Window for details.
---
The builds are happening from the command line by calling 'devenv solution.sln'. If we open VS2010 and try a build interactively it works fine. But then wiping the entire solution and all sources files, getting them fresh from source control and running a new command line build fails.
I do not have the schema.dbmdl file under source control as this appears to be rebuilt on its own.
Any idea what's up?
All Replies
-
Monday, October 04, 2010 4:50 PM
Not sure but I would check the following:
* Did you compare the files between when getting from source code control and doing a interactive build inside VS? This might provide a hint towards what is different or has changed
* Does the output window have more detail?
* Did you try using devenv.exe /log to collect a log file?
GertD @ www.DBProj.com -
Tuesday, October 05, 2010 9:45 PM
This one is really baffling me. I've never had a VStudio issue like this.
I enabled the /log option on devenv and there are no errors in the resulting file. I'd include it inline here but it is quite long.
As for the output window, well this is a command line build so where do I access an output window? When I build it interactively it is successful.
I am completely unable to reproduce this on my local machine, but it happens on every build server we have (of which there are many). I've tried x64 and x86 flavors of Windows to no avail. One difference I can't change is that the build servers are running Server 2008 (x64 and x86) whereas I am locally running Win 7 x64.
I have completely run out of ideas. I really need help...
-
Monday, October 11, 2010 9:04 PM
I too experience this problem but only when the build agent runs the build.
i'm having the build agent run the build on my local machine. when i run the build through command line(MSBUILD) pointing at the local folder for the build agent, everything works fine. when the build agent runs it. everything breaks. i use TeamCity. perhaps you do also? maybe the problem lies with how TC is starting the build? IF you don't use TC, i'm stumped also. cannot imagine what could be different.
- Edited by Beta0 Monday, October 11, 2010 9:06 PM adding clarification
-
Monday, October 11, 2010 11:19 PM
I don't use TeamCity, however I did discover today that if I do a command line build using msbuild rather than devenv it works fine. I have migrated our build process to use msbuild so I can get past this issue and it checks out fine on all of our build servers. Switching to msbuild has no real effect on our overall process so the end result for me is that the problem is avoided, though I still have no idea what the root of the problem was.- Marked As Answer by Curious George Monday, October 11, 2010 11:19 PM
-
Wednesday, June 01, 2011 11:09 PM
Ran into this same problem today. Yes to TeamCity in my case. Msbuild is not an option since I'm invoking devenv specifically to build a setup project that msbuild doesn't support. I don't even care about the database projects for this build, cause the whole rest of the solution is build with msbuid.
Frustrating...
Maybe I'll have to create another solution with just the one project. Or switch to WiX, which is pain I'd rather avoid.
-
Wednesday, December 28, 2011 7:37 AM
To get rid of error : Error HRESULT E_FAIL has been returned from a call to a COM component, do the steps below:
1) Login into the build server with the TFS Build ID.
2) Run devenv.exe /ResetUserData once.
3) Compile once with devenv.exe IDE (from the build workspace).
4) This time, try to run with devenv.com.- Edited by lannyboy Wednesday, December 28, 2011 7:40 AM

