nunit / nunit-console

NUnit Console runner and test engine
MIT License
212 stars 149 forks source link

Add parameter for .NET installation/binaries directory path #1381

Open MichalMucek opened 5 months ago

MichalMucek commented 5 months ago

Add a parameter to NUnit Console for .NET installation/binaries directory path that, when defined, will omit or extend NUnit.Engine.Internal.TestAssemblyResolver.GetDotNetInstallDirectory().

The motivation behind this feature is to enable the NUnit Console to work in Windows environments where .NET is not installed but only .NET binaries are downloaded, e.g. during pipeline execution.

stevenaw commented 5 months ago

@MichalMucek Are the binaries used in your pipeline for net framework or core/net5+?

For the latter, I think the DOTNET_ROOT environment variable would be the standard way to define this if the console runner were updated to support this (https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_root-dotnet_rootx86).