-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 10] certain [Obsolete]
warnings are not reported
#76226
Comments
I don't know what SYSLIB is. But is isn't roslyn :) |
@CyrusNajmabadi this is if you have |
Ok, this works fine, I get a warning if I call it: [Obsolete]
public void Test()
{
} This doesn't produce a warning at all: [Obsolete("whoopsies", DiagnosticId = "SYSLIB0024")]
public void Test()
{
} |
Is it possible that "SYSLIB0024" warning is disabled by default in the new SDK? @jonathanpeppers What happens if you use a different diagnostic id? For example:
|
When testing this, I found this also produces no warnings: [Obsolete("whoopsies")]
public void Test()
{
} What made me notice this issue, warnings related to |
I investigated this. It's not a Roslyn bug, but an SDK bug. WarningLevel used to align with the .NET version, and the way the SDK does it is using this: Now we are two digit version (10) 😄 |
This is fixed now in SDK and can be closed |
When Maestro/codeflow makes it to the dotnet/android repo, I'll be able to try it out and close this, thanks! |
@jonathanpeppers I am going to close this issue as fixed. If the problem is still there with updated SDK, please reactivate this issue and attach a complog (https://github.com/jaredpar/complog). |
Version Used: .NET SDK 10.0.100-alpha.1.24573.1
We noticed this from Maestro/codeflow here:
Steps to Reproduce:
AppDomain.CreateDomain("test")
in .NET 10SYSLIB0024
warningRepro: testroslyn.zip
Note that this seems to work fine using
net9.0
and a .NET 9 SDK.Diagnostic Id:
Expected Behavior:
I get a
SYSLIB0024
warning.Actual Behavior:
I get no
SYSLIB0024
warning.Other info:
Note that if I open
packs\Microsoft.NETCore.App.Ref\10.0.0-alpha.1.24570.9\ref\net10.0\System.Runtime.dll
, it looks correct:The warning also seems to work fine if I declare an
[Obsolete]
method within the C# file.The text was updated successfully, but these errors were encountered: