Following situation:
I have a third party tool which executes the nunit-console.exe to run unit tests. I've switched the tests to dot net 5.0 as this is a new requirement in our company. Now when I run the nunit-console.exe (Version: NUnit Console Runner 3.12.0-beta2) in the console the same way the third party app does I get this error:
>E:\Nunit\netcoreapp3.1\nunit3-console.exe "C:\Tests\bin\Debug\net5.0\Tests.dll"
it was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
- The following frameworks were found:
5.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
So a possible solution to fix this would be running the console like this:
dotnet.exe --fx-version 5.0.7 E:\Nunit\netcoreapp3.1\nunit3-console.dll "C:\Tests\bin\Debug\net5.0\V20.Tests.dll"
Which works perfectly in the console but is not compliant to the third party app as it needs the nunit-console.exe to execute
Does anybody have a creative idea how to solve this in an rater easy manner?