What branch is on which environment?

There is an easy way to keep tabs about what code is on each environment. There is a good MSBuild project which provides a set of useful additional MSBuild tasks:


To reference the extra tasks, you will need to make sure you have referenced the MSBuild Community Tasks Project DLL. The tasks of interest are GitVersion and GitBranch which will provide details of the SHA and branch that is being deployed. The following target is what you need to get started:

This will generate a file to App_Config/__DeployInfo which will look something like:

Similar functionality could be added for Mercurial but isn’t included in this project, the following could be useful: https://msbuildhg.codeplex.com/documentation

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">