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
Start-Process chrome $htmlFile
VSFF* – Visual Studio Full Fat. Just to make an obvious distinction with VSCode.
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:
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: https://github.com/dotnet/roslyn/wiki/FAQ