-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Condition EnableSingleFileAnalyzer #91474
Conversation
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsWith the latest SDK, a warning is generated if the analyzer is enabled on an unsupported SDK.
|
How did you encounter this? I'm wondering why it wasn't hit in #90880. |
With the latest SDK, a warning is generated if the analyzer is enabled on an unsupported SDK.
e39f727
to
73ea692
Compare
@@ -14,7 +14,7 @@ | |||
<PropertyGroup Condition="'$(RunAnalyzers)' != 'false'"> | |||
<EnableSingleFileAnalyzer Condition=" | |||
'$(EnableSingleFileAnalyzer)' == '' And | |||
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true</EnableSingleFileAnalyzer> | |||
$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</EnableSingleFileAnalyzer> |
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 don't understand this change. dotnet/runtime main only builds net8.0 and net9.0 now. Why do we need this .NETCoreApp check?
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.
Are you sure? I see a lot in Microsoft.Extensions that has netstandard2.0
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'd have expected the '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
condition to take care of netstandard TFMs.
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.
Exactly. The TFI == .NETCoreApp
check should already only apply to .NETCoreApp TFMs.
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.
Please respond to my question before merging as I don't think this is right.
Hmm, can't repro this anymore... I wonder if it was a stale interaction. |
With the latest SDK, a warning is generated if the analyzer is enabled on an unsupported SDK.