简体   繁体   中英

MSBuild solution with two web projects

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM