MS Build – Publish to FileSystem

I’m working for a simple project and wanted to deploy it to the webserver in my church. I installed TeamCity and set it up to pull the source code from github and build it.

The challenge was, unexpectedly, publish. Initially, I used MS Web Deploy. For some reason I couldn’t figure out, it didn’t work. Also, I had to install an extra service. So I went for a simple msbuild file system deploy.

msbuild .\WebDrive.csproj /t:Package
    /p:_PackageTempDir="\\webserver\output" /p:Configuration="Release"

On TeamCity, I added an additional build step and configure it like these

  • Runner type: MSBuild
  • Build file path: WebDrive/WebDriveWeb.csproj
  • Targets: Clean;Build;Publish
  • Command line parameters: /t:Package /p:_PackageTempDir=”\\web\output” /p:Configuration=”Release”

Much simpler that web deployment.


One thought on “MS Build – Publish to FileSystem

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s