This project has been replaced by Bullseye. It is recommended to migrate your targets from simple-targets-csx to Bullseye.
This project is no longer maintained. If you would like to take it over, please raise an issue or contact the owners of the NuGet package via the NuGet gallery.
A minimalist C# script library for writing targets for building, analysing, testing, packaging, deploying, etc. and running them using any runner which supports the "standard" C# script dialect (as defined by csi.exe).
In no way restricted to writing targets related to .NET projects.
- Install (or download and unzip) the NuGet package.
- Create a C# script named
build.csxand add the following code:
#load "packages/simple-targets-csx.6.0.0/contentFiles/csx/any/simple-targets.csx" // change the path as required using static SimpleTargets; var targets = new TargetDictionary(); targets.Add("default", () => Console.WriteLine("Hello, world!")); Run(Args, targets);
csi.exe .\build.csx(see "Runners").
|Run a specific target||
|Run multiple targets||
|List targets and dependencies||
|Skip running dependencies||Append
|Show full usage details||
- csi.exe - Microsoft's "C# REPL Command-Line Interface". This is bundled with MSBuild 14 (and Visual Studio 2015) onwards so it's a good choice if you are using simple-targets-csx to write a build script for a .NET project, since the project will already likely have a dependency on MSBuild.
- Dude - the portable C# script runner (csi.exe conveniently repackaged as a single self-contained exe). This is a good choice if you don't want or need to have a dependency on MSBuild.
dude.execan easily be downloaded and cached by a bootstrap command (similar to
NuGet.exein the example below).
Other C# script runners such as dotnet-script should also work.
xBehave.net uses a bootstrap command to
- Download and cache
- Restore NuGet packages (including simple-targets-csx)
- Execute its build script using csi.exe