Issues icon indicating copy to clipboard operation
Issues copied to clipboard

C# script steps failing due to missing dependency

Open benPearce1 opened this issue 4 months ago • 0 comments

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

Image

Workaround

Options:

  • Install .NET 6
  • Install the dotnet-script tool. 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_FORWARD with a value of Major or LatestMajor to the worker.

benPearce1 avatar Sep 11 '25 01:09 benPearce1