Unable to execute cmd.exe
I have been banging my head against the wall on this one ...
I found a thread with similar issue and tried advice from there.
1) Running as a domain user
2) Added directories through tools->options->VC++ directories as other thread mentioned.
Not sure what else to try at this point. Build log follows.
Greg
Build 'Poker :: Main Build' #25
Started 'Wed Mar 11 22:10:05 GMT 2009' on 'teamcity' by 'teamuser'
Finished 'Wed Mar 11 22:12:33 GMT 2009' with status 'ERROR Compilation failed'
TeamCity URL .../viewLog.html?buildId=25&buildTypeId=bt225
[22:10:03]: bt2
[22:10:03]: Checking for changes
[22:10:05]: Clean build enabled: removing old files from C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be
[22:10:05]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[22:10:05]: Checkout directory: C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be
[22:10:05]: Getting project sources
[22:12:22]: Loading changed files from server...
[22:12:28]: Starting build process in C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be
[22:12:29]: Project "Poker.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_1a692d8ccb1c4817b681a2379e4e5538 target(s)):
[22:12:29]: [Project "Poker.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_1a692d8ccb1c4817b681a2379e4e5538 target(s)):] Project "Poker.sln" (Rebuild target(s)):
[22:12:29]: [Project "Poker.sln" (Rebuild target(s)):] Building solution configuration "Release|Mixed Platforms".
[22:12:29]: [Project "Poker.sln" (Rebuild target(s)):] Project "PokerCommon.csproj" (Rebuild target(s)):
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] Creating directory "obj\".
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] Creating directory "..\..\bin\Release\".
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] Creating directory "obj\Release\".
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /keyfile:djlc.snk /optimize+ /out:obj\Release\Poker.Common.dll /target:library Properties\PokerCommonAssemblyInfo.cs src\Poker\Common\Card.cs src\Poker\Common\CardIndex.cs src\Poker\Common\HandRange.cs src\Poker\Common\CardSet.cs src\Poker\Common\Deck.cs src\Poker\Common\GameConstants.cs src\Poker\Common\HandValue.cs src\Poker\Common\MersenneTwister.cs src\Poker\Common\MetaHand.cs src\Poker\Common\MetaHandRange.cs src\Poker\Common\Probability.cs src\Poker\Common\SuitNormalizer.cs src\Poker\Common\Utility.cs
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] CSC warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Poker.Common.dll" to "..\..\bin\Release\Poker.Common.dll".
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] PokerCommon -> C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\bin\Release\Poker.Common.dll
[22:12:29]: [Project "PokerCommon.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Poker.Common.pdb" to "..\..\bin\Release\Poker.Common.pdb".
[22:12:29]: [Project "Poker.sln" (Rebuild target(s)):] Project "PokerCommon.csproj" (GetTargetPath target(s)):
[22:12:29]: [Project "Poker.sln" (Rebuild target(s)):] C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe /rebuild "C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\projects\Poker\PokerNative.tmp_Release_Mixed Platforms.vcproj" "Release|Win32"
[22:12:33]: [Project "Poker.sln" (Rebuild target(s)):] Project error PRJ0003: Error spawning 'cmd.exe'.
[22:12:33]: sln2005 output:
Creating directory "..\..\bin\Release\".
Creating directory "obj\Release\".
Target CoreCompile:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /keyfile:djlc.snk /optimize+ /out:obj\Release\Poker.Common.dll /target:library Properties\PokerCommonAssemblyInfo.cs src\Poker\Common\Card.cs src\Poker\Common\CardIndex.cs src\Poker\Common\HandRange.cs src\Poker\Common\CardSet.cs src\Poker\Common\Deck.cs src\Poker\Common\GameConstants.cs src\Poker\Common\HandValue.cs src\Poker\Common\MersenneTwister.cs src\Poker\Common\MetaHand.cs src\Poker\Common\MetaHandRange.cs src\Poker\Common\Probability.cs src\Poker\Common\SuitNormalizer.cs src\Poker\Common\Utility.cs
CSC : warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
Done building target "CoreCompile" in project "PokerCommon.csproj".
Target CopyFilesToOutputDirectory:
Copying file from "obj\Release\Poker.Common.dll" to "..\..\bin\Release\Poker.Common.dll".
PokerCommon -> C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\bin\Release\Poker.Common.dll
Copying file from "obj\Release\Poker.Common.pdb" to "..\..\bin\Release\Poker.Common.pdb".
Done building project "PokerCommon.csproj".
Target Libraries\PokerNative:Rebuild:
__________________________________________________
Project "C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\projects\Poker.sln" is building "C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\projects\Poker\PokerCommon.csproj" (GetTargetPath target(s)):
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe /rebuild "C:\TeamCity\buildAgent\work\2b5ef4d3a459a9be\projects\Poker\PokerNative.tmp_Release_Mixed Platforms.vcproj" "Release|Win32"
Project : error PRJ0003: Error spawning 'cmd.exe'.
Done building target "Libraries\PokerNative:Rebuild" in project "Poker.sln" -- FAILED.
Done building target "Rebuild" in project "Poker.sln" -- FAILED.
Done building project "Poker.sln" -- FAILED.
Build FAILED.
CSC : warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
Project : error PRJ0003: Error spawning 'cmd.exe'.
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:04.17
[22:12:33]: Process exit code: 1
[22:12:33]: Build finished
Message was edited by: Yegor Yarko
Please sign in to leave a comment.
Could you please check user account that runs build agent service. Please try using some administrator user but not the LOCAL SYSTEM.
That is the case currently.
It is running as an account that is not local system but is an administrator on the machine.
Greg
Is it running as a service? I ran into problems with that as well; I had to install the build-agent to (a) run as a service, and (b) the service had to run under a user with admin-privs, and (c) that user had to have
C:\Documents and Settings\tcbuild\Local Settings\Application Data\Microsoft\VisualStudio\8.0
So basically we had to setup the user with privs, login as that user and startup VS.2005 before running any builds.
Having said that, your problem is not exactly what I saw, I never tried to literally exec cmd.exe. I did have a post-build step to run a bat file, but I don't think that's the same thing. Is that what you're doing that's failing?
Any further response to this?
Also as this forum won't let me edit my original post could an admin please remove the url from it?
Thanks,
Greg
Greg, could you plase have a look to our guide to make VC build work.
http://www.jetbrains.net/confluence/display/TCD4/Setup+VC+Build
Looking forward to hear feedback from you.
The issue has gone away with an upgrade to 2008.
All of the steps listed (except for not using the solution runner) had been previously tried.
Greg