Rajesh
Rajesh

Reputation: 11

Putting solution build output in a different directory !

I have an issue in building my solution (Hardcopy.sln) .This solution consists of many other modules & each module is directing their output to the bin/debug/ folder. during the whole solution build . i want to redirect the output of each module to a different location .how to do the same. i am using the MSbuild utility to build the solution in my nant scripts .

i want to do it using Msbuild utility in the Nant is there any way out:

Thanks Rajesh

Upvotes: 1

Views: 6413

Answers (2)

Julien Hoarau
Julien Hoarau

Reputation: 49990

  • Using MSBuild Nant task :

    <msbuild project="Hardcopy.sln">
      <property name="Platform" value="Any Cpu" />
      <property name="Configuration" value="Debug" />
      <property name="OutputPath" value="DIFFERENT_DIRECTORY_PATH" />
    </msbuild>
    
  • Using msbuild directly :

    msbuild Hardcopy.sln /p:Platform="Any Cpu";Configuration=Debug;OutputPath=DIFFERENT_DIRECTORY_PATH
    
  • Modifying the OutputPath property in projects file. Manually or with Visual Studio project properties.

Upvotes: 8

saret
saret

Reputation: 2227

Not sure if you're looking to have only a specific build done with MsBuild to be directed to the folder, or for all builds (including Visual Studio) to go to the build folder. This assumes you want all builds to go to a different folder.

In Visual Studio, goto the project properties screen (right click on any revelant projects and choose properties from context menu). In the new windows goto the build tab and under there are output settings. You can specify a path to build to here (you can also utilize relative paths here). You would need to do this for any relevant build configuration - such as for debug and release - you can switch between these through the Configuration combobox on that screen.

This will cause Visual Studio and MsBuild to direct the build output to the folder specified

Upvotes: 0

Related Questions