-
-
Notifications
You must be signed in to change notification settings - Fork 754
.NET 8 Update(2): TargetFrameworks #1728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 8 Update(2): TargetFrameworks #1728
Conversation
suppress SA1402
|
I can build the solution and all tests are passed in dotnet CLI. |
AArnott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on these changes. They all look good.
in Visual Studio 17.8.4, the build process fails at sandbox/SharedData.
I'm not seeing the failure in that project. But I do see a build failure in MessagePack.GeneratedCode.Tests when it runs from visual studio (CLI is fine, as you say). I'll look into this and loop in the roslyn team if I suspect a compiler bug.
src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackBinaryTest.cs
Show resolved
Hide resolved
AArnott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One link of the chain that explains why build in VS fails is that the GeneratedMessagePackResolver type in Sandbox and SharedData is being generated as internal instead of public, making it inaccessible to the MessagePack.GeneratedCode.Tests project.
A MessagePackAnalyzer.json file for each of these projects specify that this resolver should be produced publicly. And indeed, dotnet build honors this. But the VS build doesn't.
I'll keep investigating.
|
Thank you for your investigating. |
AArnott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the problem. Our in-solution .props file for activating the source generator is missing a few dependencies, causing the in-VS build to fail to deserialize the json file, and when it fails to do that, it just swallows it and proceeds with default behavior. Not great on multiple levels. I'm preparing a fix now.
|
Thank you! |
AArnott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for preparing these changes!
TargetFramework Changes
net6.0->net6.0andnet8.0net7.0->net8.0Code Fixes
LangVersion
If
TargetFrameworkisnet8.0thenLangVersionis12else as-is.