How to find latest version of MsBuild in powershell

Build scripts for .net are always a bit painful, and Microsoft has not made it easy over the years as every release they change the paths. For 2017 it is even worse and it depends on the edition so they want you to use vswhere.exe to locate the installed version(s) of msbuild. I find the following bit of Powershell to be far more portable and reliable. Function Find-MsBuild([int] $MaxVersion = 2017) { $agentPath = "$Env:programfiles (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15....

September 19, 2017 · 2 min · 228 words · Alastair Crabtree

Smoke test windows authenticated sites with Octopus Deploy

After deploying a website don’t assume it succeeded - add automated tests to check everything works. Back in the old days you would open a browser and check your new version of the site works - make sure IIS is running, the app pools starts, your database login credentials are valid etc. A human sanity check is always good - i still do it often - but ideally I want to know during deployment if something simple like that has caused the deploy to break the system....

May 5, 2016 · 4 min · 643 words · Alastair Crabtree