TFS and VSTS API: NuGet for dependencies

Much of the pain around including references to TFS assemblies and other dependencies can be removed by using NuGet to set up the assemblies. The only gotcha I found was that if you are importing a VS project whose target framework is say 4.0, then the NuGet execution fails.
In those cases, target say 4.6 and things will be fine.
Using the NuGet rather than adding references by hand does create an enormous amount of bloat, as the NuGet package picks up anything that MIGHT be needed as a dependency, and sticks it under References.

So working through the example screenshots below, the flow shows (credit here btw for the source Solution):

  • The build fails because the References cannot be found
  • We do an initial NuGet execution, which also fails
  • We then move from the 4.0 target to 4.6
  • Redo the NuGet import
  • Rebuild – compile succeeds

Install-Package Microsoft.TeamFoundationServer.ExtendedClient




Pester: pretty summaries

Short examples of a mix of passing and failing Pester tests being rendered in a browser, using ReportUnit, available on NuGet, and ingesting NUnit output format. Check out the browser screenshots below first for the end result.


# Runs all test suites, passes the output to the NUnit format, renders it, displays in a browser

# see my article here for installing nuget via Choco:



nuget.exe install ReportUnit

#Then, for example...

# Execute all the tests

$outputName = Get-Random

$outputFile = "$PSScriptRoot/$outputName.xml"

$htmlFile = "$PSScriptRoot/$outputName.html"

Invoke-Pester -PassThru -Strict -OutputFile $outputFile -OutputFormat NUnitXml

.\ReportUnit.1.2.1\tools\ReportUnit.exe $outputFile

Start-Process chrome $htmlFile

VSFF*: XUnit and related

VSFF* – Visual Studio Full Fat. Just to make an obvious distinction with VSCode.

Roslyn: First Steps

Roslyn, AKA the .Net Compiler Platform, is used in Visual Studio 2015 for the C# and Visual Basic compilers. MS Blog. My motivation is that I want a simple, small C# compiler footprint that I can use with Visual Studio Code.

Now Visual Studio is anything but lightweight (they REALLY got this naming wrong between VS and VS Code)… but if you go to Roslyn on GitHub, download Nuget.exe as Raw, go to Powershell I guess as Administrator, and run this:

.\nuget.exe install Microsoft.Net.Compilers

then you get the csc.exe and its dependencies.

Screenshots to cover all that:












OmniSharp02 OmniSharp03



OmniSharp06 OmniSharp07

Compilation using csc.exe

We then come to actually compiling something trivial. msdn guidance here.

This is a linked page from there to the simplest possible console app. Just SO disappointing in a page about VS2015, they’re using a Windows Batch script to wrap it and not PowerShell. Anyhoo… if you have this content:

(tidy up another time)

Link to the Roslyn wiki on GitHub: