Issues
Issues copied to clipboard
C# script steps failing due to missing dependency
Severity
Blocking a handful of customers, but workaround available
Version
2025.2 and later
Latest Version
I could reproduce the problem in the latest build
What happened?
When upgrading to 2025.2 or later, the default scripting engine for C# scripts has changed, as per this issue.
The change to dotnet-script also brings a dependency on .NET 6 to be installed. Later versions won't automatically be used.
Reproduction
Attempt to run a C# script step on a worker that only has .NET 8 or later.
Error and Stacktrace
More Information
Workaround
Options:
- Install .NET 6
- Install the
dotnet-scripttool. This can be done via the script console or directly on the worker using the command:dotnet tool install dotnet-script --global - Add the environment variable
DOTNET_ROLL_FORWARDwith a value ofMajororLatestMajorto the worker.