Orchestrator script
The setup guide explains how to create the build system as a C# console project. You may see this as an overkill. Other technologies define the build system in a simple script. We can also do that in C#.
dotnet script is a dotnet tool that allows to run files with C# code without having to create a full project. You can replace the console application with a C# script with these steps.
Install dotnet script:
dotnet tool install dotnet-script
Copy the content of
Program.cs
into a filebuild.csx
in the root of the repo.At the top of the file define the NuGet dependencies:
#r "nuget: Cake.Frosting.PleOps.Recipe, 1.0.0
Run the script:
dotnet script ./build.csx --isolated-load-context
Note
The argument --isolated-load-context
is required so the script runs with its
own dependencies instead of re-using the ones from the tool dotnet-script.
Otherwise you may have weird errors with nuget as dotnet-script and Cake
may use different versions of the NuGet libraries.