views:

41

answers:

1

Hi, my solution has two web projects. What I want to do is to build the solution through team city but have each web project going to a different output directory?

Does anyone know how to do this?

I am using Nant but I believe I can push through any required parameters into MSBuild.

Thanks.

A: 

The way I have been controlling the output path, is by adjusting the XML of the project specified output path to conditional locations:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <DebugType>pdbonly</DebugType>
  <Optimize>true</Optimize>
  <OutputPath Condition=" '$(TeamBuildOutDir)'=='' ">..\bin\Release\AddIns\LanPortal\</OutputPath>
  <OutputPath Condition=" '$(TeamBuildOutDir)'!='' ">$(TeamBuildOutDir)$(RelatedBuildDiretory)AddIns\LanPortal\</OutputPath>
  <DefineConstants>TRACE</DefineConstants>
  <ErrorReport>prompt</ErrorReport>
  <WarningLevel>4</WarningLevel>
</PropertyGroup>

The visual studio IDE only reveals one of the two output locations and gives no indication that I've made the edit. But when msbuild sees that setup, it understands.

p.s. this is my take for VS2008. It should be the same for VS2010 as well (for both C# and C++ projects)

Brent Arias
Can this be done via Nant?
RemotecUk
If you can push parameters through from Nant to msbuild, then the answer is yes...because MSbuild is the tool which would honor those conditions and paths based on the parameters you supplied.
Brent Arias