You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have .NET 7.0 SDK installed anymore, since I've moved my projects off to .NET 8.0. CSharpier_FrameworkVersion sometimes incorrectly resolves to .NET 7.0 due to unreliable heuristics:
<CSharpier_FrameworkVersionCondition="'$(CSharpier_FrameworkVersion)' != 'net6.0' and '$(CSharpier_FrameworkVersion)' != 'net7.0' and '$(CSharpier_FrameworkVersion)' != 'net8.0'">net7.0</CSharpier_FrameworkVersion>
The two most common scenarios are:
The project is a library that targets .NET Standard 2.1, but .NET 8.0 SDK is used to build it.
The project is targeting a superset of .NET 8.0, for example net8.0-windows.
In either of these cases, CSharpier resolves to the .NET 7.0 version of the tool, which may not be able to execute (as in my case).
My suggestion is to not rely on the TargetFramework property for this, but instead use the current SDK version, which can be extracted from the NETCoreSdkVersion property, as defined by one of the built-in imports.
The text was updated successfully, but these errors were encountered:
That sounds like a problem with the nuget package not being restored correctly, I don't think I've seen that. I know one of the net8 RC's had some issues around restoring tools, but it looks like you are on the official release.
I don't have .NET 7.0 SDK installed anymore, since I've moved my projects off to .NET 8.0.
CSharpier_FrameworkVersion
sometimes incorrectly resolves to .NET 7.0 due to unreliable heuristics:csharpier/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets
Lines 3 to 4 in ef79538
The two most common scenarios are:
net8.0-windows
.In either of these cases, CSharpier resolves to the .NET 7.0 version of the tool, which may not be able to execute (as in my case).
My suggestion is to not rely on the
TargetFramework
property for this, but instead use the current SDK version, which can be extracted from theNETCoreSdkVersion
property, as defined by one of the built-in imports.The text was updated successfully, but these errors were encountered: