tags:

views:

21

answers:

1

I am building a windows forms application from the command line, twice. The first time I specify an output name "A", the second time I specify "B" (using /p:AssemblyName="..." as parameter). However the result of the first build (A) is replaced during the second build, and I end up only with B. How can I prevent this?

+2  A: 

The simplest way would be to just copy or move the results (e.g. the bin directory) before running msbuild the second time. Any reason not to go with that solution?

Jon Skeet
It is actually the solution I am using now ... however I was thinking there is a more elegant way to solve the issue, maybe another command line parameter.
iulianchira
@iulianchira: I don't believe so. I *think* msbuild assumes the output directory can be blown away before each build.
Jon Skeet