Deploying .NET with Jenkins/Hudson

Dan Williams picture Dan Williams · Apr 7, 2011 · Viewed 22.8k times · Source

I've been using Jenkins/Hudson CI for deploying my .NET web site project. I've been using the MSbuild plugin to build my project, and then xcopy to copy it out to the server.

I've noticed if I use the publish feature in Visual Studio I get a different set of files. I've got the config transforms working, but I end up with all the .cs files and a winmerge compare shows the binaries being different.

So, I'd like to either get Jenkins working just like the publish feature, or confirm that an xcopy deploy is functionally the same thing.

Answer

Anders Lindahl picture Anders Lindahl · Apr 7, 2011

I've had good experiences with using Web Deploy and as a final build step with Jenkins running a bat file containing:

msdeploy.exe -verb:sync -source:package=%PACKAGE% -dest:auto,ComputerName=%TARGETHOST%

You'll have to install the web deploy package on your build server and the extention on IIS.