Saturday, April 13, 2013

Web Deployement in TFS2012

Web Deployment in VS2012 relies on the new Publish framework and the use of publish profiles.
using these profile gives us the ability to create different publishing for different environments.

all that is nice and well and work splendid with the VS2012, but what with my Builds?

We have 2 options:
  1. Add to Build Definition, Process->Advanced->MSBuild Arguments "/p:DeployOnBuild=true /p:PublishProfile=<Publish Profile Name>"
  2. Add the following lines to a project configuration
<DeployOnBuild>True</DeployOnBuild>
<PublishProfile>Deploy2</PublishProfile>

Using option 2 works better with multiple websites in the same solution

Also for File System Publish update publish profile like this, because of a bug in the build:
<publishUrl>$(MSBuildThisFileDirectory)..\Deployment\</publishUrl>


$(MSBuildThisFileDirectory) - the location of the pubxml in the project properties

No comments:

Post a Comment