You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Analyzer-specific properties in eng/Analyzer.props are evaluated before IsAnalyzerProject is set #15322
Follow-up discovered while investigating #15314; separate from its architecture-routing fix.
Directory.Build.props imports eng/Analyzer.props before the project body is evaluated. eng/Analyzer.props defaults IsAnalyzerProject to false and immediately conditions a property group on it being true. However, the analyzer/code-fix projects declare <IsAnalyzerProject>true</IsAnalyzerProject> in their project bodies, after that import.
Consequently, the conditional group is skipped and is not reevaluated when the project later sets the property. Its intended settings do not take effect:
This means the projects are marked as analyzer projects by the end of evaluation, but lack the intended Roslyn-component marker and compilation symbol. No additional runtime or packaging failure is claimed here; the confirmed defect is the missing evaluated properties.
Expected: IsRoslynComponent=true, and DefineConstants includes WINFORMS_ANALYZERS while preserving existing symbols.
Suggested scope
Apply analyzer-dependent settings after the project has declared IsAnalyzerProject (for example, in the existing analyzer targets mechanism), preserving any existing compilation symbols. Add evaluation regression coverage for the C# and VB analyzer/code-fix projects, plus a non-analyzer control project.
.NET version
Reproduced with the repository-pinned SDK 12.0.100-alpha.1.26480.102 during investigation of #15314.
Did it work in .NET Framework?
Not applicable: repository MSBuild evaluation issue.
Did it work in any earlier release?
Not verified; this appears to predate the changes in #15314.
Activity