flipdoubt
flipdoubt

Reputation: 14435

Why does Nant driven MsBuild compile to different directory on different machines?

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?

Upvotes: 0

Views: 781

Answers (2)

haqwin
haqwin

Reputation: 377

Are you sure ${project.config} point to the same place in both local and TeamCity environments?

The agent are not always running with the sem environment variables as the local machine. So I would start out to check all properties and see where they point in the local machine as well as TeamCity.

As for the /p:Configuration=${project.config}, you can only have one configuration running but you can specify more properties with ; between them:

/p:Configuration=${project.config};OutDir=bin\x86\Release

Upvotes: 1

Michael Larionov
Michael Larionov

Reputation: 480

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

Upvotes: 1

Related Questions