How to simulate a tfs build locally

When tfs is used as a build server it builds the visual studio projects differently to the way the IDE does.
Typically it will dump all of the build artifacts into a single folder (which breaks almost any post-build scripts).
However if you are building web applications it has a clever option that builds a useful web applications folder with everything that is needed to be deployed.
This happens for any web project where the output directory is redirected.

msbuild Whatever.sln /p:configuration=Release /p:OutDir=c:builds

This is useful when you have a web site project in visual studio 2010 (say a silverlight web project) that you would like to deploy but don’t have enough space on the build server to install the right tools.
This is quite powerful but would be useful if the documentation for this was more obvious.

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 )

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