Peter K.
Peter K.

Reputation: 8108

Multiple web deployment packaging using TFS build

We have several web services that we have been deploying "manually" using msdeploy. We pick up the deployment packages from the TFS2010 build machine in the appropriate _PublishedWebsites\<<ProjectName>>_Package directory.

We now want to wrap the deployment packages up with a deployment tool that makes it easier for the person doing the installation to see the parameters.

What we'd like to do is to build the individual web service deployment packages, have the deployment packages land in the right place for the deployment tool build and then have the deployment tool build both build the tool and copy the previously-built deployment packages to the same Binaries drop folder on the build machine.

For some reason, this seems incredibly difficult to do.

Things we've tried

Any advice appreciated! Are we going about this the wrong way? Should we be doing something like altering the build XAML to cater for this (like this page suggests for another issue)?

Upvotes: 3

Views: 1551

Answers (1)

Nick Nieslanik
Nick Nieslanik

Reputation: 4458

Couple possibilities for you to consider:

1 - Alter the TFS workflow like you've described to perform some copy task

2 - Create an MSBuild project that runs after your standard Packaging steps to copy the output from _PublishedWebsites to some location of your choice

3 - Override the following MSBuild parameter when building the package to change the package drop location:

 <DefaultPackageOutputDir Condition="'$(DefaultPackageOutputDir)'==''">$(OutDir)[YourDesiredLocation]\$(DefaultMSDeployDestinationApplicationName)\Package</DefaultPackageOutputDir>

Note that you can see the set of packaging MSBuild parameters available to you at

 c:\program files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets

I recently implemented suggestion #2 at a client, using the MSBuild overrides suggested in #3 in the custom MSBuild project file and it worked like a charm.

Upvotes: 2

Related Questions