Build/Test Issues

Not seeing .net sdk versions below V9

Started by gnewtzie on 598 views

The trace output for the process is as follows:
You must install or update .NET to run this application.

App: D:\Temp\10684\39\BH.Business.Common.Test\bin\Debug\net8.0\nCrunch.TaskRunner.DotNetCore.20.x64.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '8.0.24' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
3.1.32 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
6.0.36 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
7.0.20 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
8.0.23 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
9.0.12 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
10.0.3 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

I have v8 installed and need my tests to use that version as we have also specified a global.json file in the solution directory as the following:

{
"sdk": {
"version": "8.0.*",
"rollForward": "latestPatch"
}
}


I've also tried all the versions that do show up in the Build SDK dropdown included VS 2022 and VS2026 but none cause it to compile with the V8 sdk.
Hi, thanks for sharing this issue.

This seems to be a message from the runtime loader itself. Where is this being shown for you? Is it when you choose to run a test?

I wonder if it might be trying to bind specifically to 8.0.24 for a reason. If you do a text search on your codebase, do you see any references to it?
We have to specify it in the global.json because we have VS 2026 and the .NET 10 sdk installed on our machines but we haven't updated the projects to it yet. This caused build errors because it picks the wrong version of the assemblies (the .net 9 sdk versions specifically)

Once we put the "version": "8.0.*" in the global.json it fixed the build and run issue with VS.

And if ncrunch saw all the sdk's that are installed on the machine correctly, i could just specify it in the project Build SDK but it doesn't see anything below .net 9 for some reason.

Oh and it's showing up when a project tries to build with ncrunch. not VS. any test that tried to run will get the build error.

Edited

Does adjusting the Build SDK setting to .NET 8.0 have any effect on the problem?

Could you submit a bug report directly after it fails? I'd like to take a look at the log to see if this yields any useful information.

Post a reply

Log in to reply.