Closed Tyrrrz closed 1 year ago
I believe I'm running into this issue in my source generator project. Here's the build output if it helps: https://github.com/domn1995/dunet/actions/runs/6900832597/job/18802795139?pr=187
I believe I'm running into this issue in my source generator project. Here's the build output if it helps: https://github.com/domn1995/dunet/actions/runs/6900832597/job/18802795139?pr=187
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:https://github.com/belav/csharpier/blob/ef795385ba4b83a0b61a56287fd380cc63000dee/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets#L3-L4
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.