nunit / nunit-console

NUnit Console runner and test engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NUnit Console fails to run .NET 8 tests when .NET SDK is not installed

Greg-Smulko opened this issue · comments

When trying to run a .NET 8 test project on a machine without the .NET SDK installed, I'm getting the following error:

System.ArgumentException : The netcore-8.0 framework is not available.
Available frameworks: net-2.0 net-3.0 net-3.5 net-4.0 net-4.5 net-4.5.1 net-4.5.2 net-4.6 net-4.6.1 net-4.6.2 net-4.7 net-4.7.1 net-4.7.2 net-4.8

image

Version used: NUnit Console 3.17.0+685c5b542b5e9ba632c905f0bd514a773d9758af (Release)

When I install the .NET SDK, everything is fine.

Is it by design?

When developing against target .net 8 you need the .net 8 sdk yes.

When developing against target .net 8 you need the .net 8 sdk yes.

Thanks for confirming!

I assume it's also the case even if I publish the tests as self-contained, because NUnit Console relies on dotnet test under the hood for .NET 8?

Just to be clear: NUnit.Console doesn't rely on dotnet test, but it does rely on other parts of the SDK "under the hood" as you say, so in principle you're right.

And, your test projects themselves rely on Microsoft.NET.Test.Sdk too, although small it is part of the SDK.

I believe you can find more information here: https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview