Table of Contents

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.

  1. Install dotnet script: dotnet tool install dotnet-script

  2. Copy the content of Program.cs into a file build.csx in the root of the repo.

  3. At the top of the file define the NuGet dependencies:

    #r "nuget: Cake.Frosting.PleOps.Recipe, 1.0.0
    
  4. 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.