WPF project build breaks because Roslyn Source Generators do not run in WPF inner-build
AArnott opened this issue ยท 5 comments
AArnott commented
- Create a new WPF project.
- Add a PackageReference to any source generator.
- Add code to
MainWindow.xaml.cs
that depends on the generated code. - Build
Expected
No build break
Actual
Build break.
In fact investigating the binary build log reveals that while the outer build's invocation of the Csc
task provides the "analyzers" that are actually source generators:
ryalanms commented
vatsan-madhavan commented
Would you consider making this on by default in 6.0 SDK's ?
ryalanms commented
@AArnott: I believe you validated with 5.0.102-servicing.20614.17. Can this be closed? Thanks.
ryalanms commented
Thanks.
manfred-brands commented
It took me a while to find this issue, only after finding the comment in Microsoft.WinFX.targets.
My issue was not source generators, but a DiagnosticSuppressor from an Roslyn Analyzer nuget package.