다음을 통해 공유


CustomizableOutDir in TFS 2010 with ASP.Net Projects

 

Jim Lamb has blogged about how to CustomizableOutDir using Team Build 2010 as you might want have the assemblies dropped in a custom Folder structure instead of having all assemblies in one Drop Folder, which is the default behavior.

When applying this workaround to a Solution containing an ASP.Net Project you might be missing the _PublishedWebsites folder in the Drop Folder structure:

image

Assuming you have configured the Team Build Workflow as Jim suggested:

image

You can workaround the problem by using a different definition for OutputPath and OutDir in the Webapplication.csproj File:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutDir Condition=" '$(TeamBuildOUtDir)'!=''">$(TeamBuildOutDir)\$(SolutionName)\$(MSBuildProjectName)\</OutDir>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
</PropertyGroup>

The reason why it’s failing is because the _CopyWebApplication Target will be skipped. To figure out if this is the case you can check your MSbuild log  fole the following line: 

Target "_CopyWebApplication" skipped, due to false condition; (!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'

That’s it. The Issue has been already reported via Connect.

Comments

  • Anonymous
    June 28, 2011
    Hi, Useful post, but I am getting below error: I would appriciate any help. MSBUILD : error MSB1005: Specify a property and its value. Switch: /p:SkipInvalidConfigurations=true;TeamBuildOutDir=C:Builds1TFSDemoBuild_TFSCommonBinaries;  For switch syntax, type "MSBuild /help" Thank You Pradeep Y.

  • Anonymous
    June 28, 2011
    Hi, can you share the xaml Build Workflow and your Webapplication.csproj File via the Feedback option. Thx Chris

  • Anonymous
    June 30, 2011
    The comment has been removed

  • Anonymous
    May 06, 2013
    Web site projects don't have project files to edit.