views:

48

answers:

1

I have a TFS build set up to deploy an ASP.net project to a test server.

The build works great, and deploys to the test server fine, but instead of putting it into the \Website directory that my IIS webserver is configured for, it puts the build into \Website_20100511.6

Why is the date suffixed to the directory name? Is there a way to turn that off so I can publish directly to the \Website?

+1  A: 

You don't want to have the build agent build to the actual location your site is running from. You need to add script to the end of the build process (tfsbuild.proj file) to take the code from the drop location and move it to the web server.

Something like this:

<Target Name="AfterDropBuild">

    <Message Text="PortalFilesToPublish location is $(DropLocation)\$(BuildNumber)" Importance="Low" />

    <CreateItem Include="$(DropLocation)\$(BuildNumber)\Default\_PublishedWebsites\MyWebPortal\**\*.*" Exclude="*.pdb" >
        <Output ItemName="PortalFiles" TaskParameter="Include" />
    </CreateItem>

    <Copy
      SourceFiles="@(PortalFiles)"
      DestinationFiles="@(PortalFiles ->'\\testserver.test.lab\Test Lab\MyWebPortal\%(RecursiveDir)%(Filename)%(Extension)')"
      ContinueOnError="true" />
</Target>
DancesWithBamboo