Automatic installer deploy to remote server using TeamCity and MSBuild

588 Views Asked by At

I'm having a .net WPF project that compiles to a bunch of dlls. I also have another project that compiles all the dlls and creates an installator exe.

I am also using TeamCity to automatically do those tasks for me with a press of a button.

The problem is that I want to have a separate TeamCity build configuration intended to automatically copy the result installator exe to a number of remote machines, each having specific credentials. But, unfortunately, I don't get how do I do this.

I have found some articles on automatic deploying (like this http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity.html), but, obviously, they are very specific for web projects.

So, how should I correctly deploy my installator on build?

2

There are 2 best solutions below

0
On BEST ANSWER

OK, I've found out that it's pretty easy to do this using the FtpUpload MSBuild community task. There, one can set up the credentials and all other stuff needed for uploading a file (or a set of files) via ftp.

1
On

Your best bet is to research NAnt and make a simple task that will copy the TeamCity artifact (installer) out to the specified location.

All you would need to do is have TeamCity execute the specified NAnt task after the installer has been built.

http://nant.sourceforge.net/release/0.85/help/tasks/copy.html

Update

Also, check out this question for solutions on specifying the credentials for the copy task.