Thursday, June 23, 2016

Publishing a Web Application using psake

I have long used MSBuild scripts for setting up my continuous integration builds, but I have started migrating some of my MSBuild scripts over to psake to make the code easier to test and maintain.

One of the problems I struggled with was setting up publishing for a Web Application.  Apparently, this is a bane for many developers or DevOps team members, so I was able to find a StackOverflow article which described a partial solution for my needs:

Of course, this particular snippet did not exactly work for my needs, so I tweaked it to more closely suit my needs as follows:

Of course, you will need to set up a Publishing Profile for your web application, in order for this particular script to work, but once that has been set up, you simply pass the publishUrl property in order to alter the publishing output path!

That is all there is to it!

No comments:

Post a Comment