Error spawning cmd.exe

Any ideas why I might see this?

Our solution has 1 Managed C++ project which works locally but fails on the agent.

Here is a snippet of the log:

: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Linking...
: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Creating library bin/Release\GALWrapper.lib and object bin/Release\GALWrapper.exp
: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Generating code
: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Finished generating code
: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Embedding manifest...
: [Target "GALWrapper:Rebuild" in project "Common Platform Pricer.sln"] Error spawning 'cmd.exe'.

7 comments

Hello,

Does that work if start thew build on agent using msbuild.exe?
Could you please check the user name for build agent service, please try
using non SYSEM account.

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Any ideas why I might see this?

Our solution has 1 Managed C++ project which works locally but fails
on the agent.

Here is a snippet of the log:

: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Linking...
: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Creating library bin/Release\GALWrapper.lib and object
bin/Release\GALWrapper.exp
: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Generating code
: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Finished generating code
: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Embedding manifest...
: [Target "GALWrapper:Rebuild" in project "Common Platform
Pricer.sln"] Error spawning 'cmd.exe'.



0

I am using a non-system accuont.

Interestingly if I logon to the agent with the same account and run agent.bat instead of running the Windows service it all works fine?

0

Anyone have any idea on this, it is a pain in the a55 for us not being able to run the agent as Windows Service?

Thanks

Jan.

0

Hello,
Does it work if to start agent service while being logged on to the system
as user?
Does that user has sevice-specific priviliges like log on as service and
so on?

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Anyone have any idea on this, it is a pain in the a55 for us not being
able to run the agent as Windows Service?

Thanks

Jan.



0

Hello,

You should put the following lines exactly into the list in Tools -> Options -> Projects and Solutions -> VC++ Directories

$(SystemRoot)\System32
$(SystemRoot)
$(SystemRoot)\System32\wbem

It will solve your problem.

Kind regards,

0

Thats the perfect solution. Worked for me!
Thanks.

0

Hi Jan,

run into same issue, apparently you can also set VCBuildUserEnvironment=true as an msbuild property.

With kind regards,

Giles

0

Please sign in to leave a comment.