Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Latest .NET SDK release breaks NCrunch builds - NCrunch ignores global.json
erikgassler
#1 Posted : Friday, February 16, 2024 4:14:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/24/2020(UTC)
Posts: 4
Location: United States of America

I have a .NET 8 Blazor project that has been working in .NET 8.0.100 but broke with the recent Visual Studio update that includes the new .NET 8.0.201 release.

This release is breaking the build. I am able to get around this by adding a global.json file to the root of my solution to explicitly use the .NET 8.0.100 SDK.

Quote:

{
"sdk": {
"version": "8.0.100"
}
}


This is the error thrown by the use of the new .NET SDK
Quote:

The analyzer assembly 'C:\Program Files\dotnet\sdk\8.0.201\Sdks\Microsoft.NET.Sdk.Razor\source-generators\Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'.


The issue on the NCrunch side is that NCrunch is apparently ignoring the global.json file and thus failing to build the projects when running tests.
Remco
#2 Posted : Friday, February 16, 2024 9:50:59 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

Can you confirm whether changing the Build Sdk setting to 8.0.100 fixes this issue for you?
erikgassler
#3 Posted : Friday, February 16, 2024 9:57:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/24/2020(UTC)
Posts: 4
Location: United States of America

Yes, it took some time finding it, I must have scrolled past it a dozen times but changing the Build Sdk setting to 8.0.100 for each project fixed the NCrunch builds.
Remco
#4 Posted : Saturday, February 17, 2024 1:18:52 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
erikgassler;17016 wrote:
Yes, it took some time finding it, I must have scrolled past it a dozen times but changing the Build Sdk setting to 8.0.100 for each project fixed the NCrunch builds.


This is a very new setting, and I guess we got it in there just in time :)

The search box in the top corner of the config window is useful for finding settings like this one. We have so many now that it's a bit of a maze :(
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download