U-C-S / Hurl

Choose the browser on the click of a link
MIT License
297 stars 11 forks source link

Trying to run/debug fresh clone gives error for .NET #180

Closed Jay-o-Way closed 1 day ago

Jay-o-Way commented 3 days ago

Installed Windows 11 (24H2) and apps cleanly a couple of weeks ago now. Got a fresh fork and clone, now trying to run/debug the solution. Got an error:

❌ Unable to resolve the .NET SDK version as specified in the global.json located at S:\Hurl\global.json.

and warning

⚠️ Unable to locate the .NET SDK version '8.0.300' as specified by global.json, please check that the specified version is installed.

Simply deleting file global.json solves the problem. Should this be adopted in the repo?

U-C-S commented 2 days ago

Had this issue. IIRC, Visual Studio's newer minor update uninstalls the .NET 8 SDK and installs the .NET 9 SDK. fixed it by manually installing .NET 8 SDK.

try dotnet --list-sdks once and check if .NET 8 is available in your system

Jay-o-Way commented 2 days ago

Running the command shows only v9.0.100. As said, simply deleting the json file makes the problem go away, so does the project need 8 or 9? And does a specific build-version matter? Because there are a lot of versions on https://dotnet.microsoft.com/download/dotnet/8.0 and *.404 is the latest.

U-C-S commented 1 day ago

Project needs .NET 8

CI needs it to build correctly. since dotnet build always uses latest available version in the system. this is only way to point it out to only use .NET 8 not 9 or 10.

there are a lot of versions

"version": "8.0.300",
"rollForward": "latestMinor"

the rollForward takes care of that. any 8.*.* is valid. You can set the version to be 9 instead of deleting it

Also some cases like this: https://github.com/U-C-S/Hurl/pull/160

Jay-o-Way commented 1 day ago

Project needs .NET 8

But apparently it also works fine if 8 isn't available.

Anyways, I installed 8 so problem solved.