Compilation failed: cannot load VCBuild.exe
Hi,
I have just started using TeamCity (version 5.0.3) which seems great, but I'm having some difficulties running my first project.
I'm using runner sln2008 for this project.
I have installed Windows SDK and .Net framework 3.5 to see this runner in the list of runners.
Still, I get an error message when compiling:
"Cannot load component VCBuild.exe, if it is not installed
1) install Windows SDK and .net framework
or
2) install visual studio 2008"
I saw a similar error in the forum (http://www.jetbrains.net/devnet/message/5229230#5229230) that suggested to change the user running the service, which I did, but still I can't make it work.
VCBuild needs and environment to run, it is set by a batch file when you run the SDK command line.
I guess I need to run the compilation with this environment, but can't see how.
Thanks for your help,
Philippe
Please sign in to leave a comment.
Philippe,
Sorry for the delay in replying.
You can try to run agent via "agent.bat start" command and not as a service (please make sure you stop the service beforehand).
As to defining the environment for the process, you can follow one of the links mentioned in the linked thread (e.g. Defining Properties) and edd "env." properties to the build configuration or the agent so that the environment variable go into the build.
Hi Yegor,
Thanks for your answer.
I tried running the agent with the command you gave me, but it does not change anything.
As for environment variables, I saw that it was possible to specify them in TeamCity, but Visual Studio defines a lot of variables and a whole environment that would be difficult to reproduce.
When you want to use the Visual Studio environment, you can launch a batch file that regroups the whole environment.
Even simpler, Visual Studio SDK installer provides you with a customised Command Shell shortcut with the following arguments:
C:\WINDOWS\system32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd"
In the agent's configuration page, under the tab "environment variables", I can see a line defining the command shell path.
I thought I could modify this parameters to specify the same arguments as above, but can't see where I can do so.
Is it possible to do such a thing?
Thanks,
Philippe
You may add all those veriables to build agent instance. For this do the following:
- start cmd.exe
- run SetEnv.cmd from SDK
- run agent.bat start
- exit shell
This make build agent process to inherit all environment variables.
Please vote for http://youtrack.jetbrains.net/issue/TW-6774
Thanks!
Thanks for you answer Eugene, I didn't think of doing it that way.
Still, I am having the same errors.
When looking at the logs, I can see other things unusual, like a registration problem, or missing "Microsoft Team Explorer"
I am copy-pasting the logs, maybe you can help me identify the issue here:
Thanks.
Thankyou. We have improved TFS error messages. This only means that build agent is not capable of checking out sources from TFS when 'checkout on agent' option is selected. This issue does not affect build agent.
I'm not sure I understand what you are saying: you are saying that the TFS errors are not related to my problem, is that it?
Because I'm using SVN and my checkout mode is set to "automatically on server" :)
Could it be related to the fact that it is not able to locate "Microsoft Visual Studio" and "Microsoft Windows SDK"?
No, it is not related to miss of SDK,
please feel free to post an issue to our issue tracker for that at http://youtrack.jetbrains.net
Related issue http://youtrack.jetbrains.net/issue/TW-12547