Visual-studio – Why does Nant driven MsBuild compile to different directory on different machines

msbuildnantteamcityvisual studiox86

I wrote a Nant script that executes MSBUILD.exe to compile a project on my dev machine. On my dev machine, the projects builds its output to bin\x86\Release and my Nant script zips up the contents of that directory. I then commit everything to SVN and let TeamCity run the Nant script that executes MSBUILD.exe to compile the project and zip the output, but the output is created in bin\Release and the zip file is empty because it looks in bin\x86\Release. Why does this happen?

When I make changes to the configuration and platform in VS.NET 2008, I do not see the project file light up as being changed. Are these settings stored in the project file, solution file, or user configuration file and therefore not carried over to the build server?

Best Answer

Quick fix: You can use the flag /property:OutDir=bin\x86\Release

You would have to find root cause of this. Probably configuration is incorrect. You can change configuration explicitly to something like /p:Configuration=Release