MSBuild with C# 6 and UpgradeTemplate.xaml

If you use UpgradeTemplate for your MSBuild, getting it to work with C# 6 can be a little tricky.
First, we need to set the tools version by passing these parameters to MSBuild:
/tv:14.0 /p:VisualStudioVersion=14.0

This, however, may not change the MSBuild version used to run your build. TFS Build server may still use the MSBuild from your .Net framework folder (C:\Windows\Microsoft.NET\Framework64\v4.0.30319). To verify the location of your MSBuild, used by the TFS, open one of your completed builds, and check the Diagnostics tab. It should show the MSBuild.exe forlder in the “Run TfsBuild for Configuration Folder” step.

To fix this, we need to explicitly set the ToolPath for the MSBuild template.
Open the UpgradeTemplate.xaml in Visual Studio
Right click on “Run TfsBuild for Configuration” -> Properties
Set the ToolPath property to point to your msbuild: “C:\Program Files (x86)\MSBuild\14.0\Bin\”
Don’t forget the quotation marks.

While you’re at it, check out Target Framework Migrator – it’s a Visual Studio extension, which helps update all of your projects to target a specific .Net version. Can be quite helpful when you have a lot of projects.

Linting Elixir with Credo

Got excited about Credo on a recent episode of The Elixir Fountain.
Seems to work quite well. Though, I couldn’t get the Atom plugin to work. But the command line works great.

Github repo for Credo provides all of the instructions to install.
I installed it as stand alone:

$ git clone [email protected]:rrrene/credo.git
$ cd credo
$ mix deps.get
$ mix archive.build
$ mix archive.install

Also had to install bunt, since it is a dependency:
git clone https://github.com/rrrene/bunt
cd bunt
mix archive.build
mix archive.install

After that, run “mix yourElixirFile.exs” and it will lint your file with something like this:

Credo Output