-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Incorrect SYSLIB1102 error #94826
Comments
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsDescriptionI updated grpc/grpc-dotnet to use .NET 8 SDK. A new error showed up in a project with The description at https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib1100-1118 says C# 11 or later is required. I verified my app is using C# 11: <Target Name="WriteVersion" BeforeTargets="BeforeCompile">
<Message Importance="High" Text="Version: $(LangVersion)" />
</Target>
The problem disappeared after I changed Reproduction StepsChange the version back to 11.0 to see the error. Expected behaviorEither works with C# 11, or the warning correctly says C# 12 is required. Actual behaviorBreaks with C# 11, and a warning says C# 11 or later is required. Regression?I think this regressed between .NET 8 RC1 and .NET 8 RTM (although I might not have been using the final version of RC1. It definitely worked during .NET 8 previews) Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
The error message is wrong. it should specify |
If you look at the screenshot and build output, you’ll also see there is no error message, just the link. I think that should be fixed as well. |
That is interesting. We have tests to check the diag Line 30 in 45978bd
You may try the code like Line 42 in 45978bd
|
Description
I updated grpc/grpc-dotnet to use .NET 8 SDK. A new error showed up in a project with
<PublishTrimmed>true</PublishTrimmed>
: SYSLIB1102The description at https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib1100-1118 says C# 11 or later is required. I verified my app is using C# 11:
The problem disappeared after I changed
<LangVersion>
to 12.0.Reproduction Steps
See grpc/grpc-dotnet#2321
Change the version back to 11.0 to see the error.
Expected behavior
Either works with C# 11, or the warning correctly says C# 12 is required.
Actual behavior
Breaks with C# 11, and a warning says C# 11 or later is required.
Regression?
I think this regressed between .NET 8 RC1 and .NET 8 RTM (although I might not have been using the final version of RC1. It definitely worked during .NET 8 previews)
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: