Skip to content

Commit 6ef7110

Browse files
authored
Fix build when using source generators coming from NuGet package (#6800)
1 parent c2a17b1 commit 6ef7110

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,20 @@
513513

514514
</Target>
515515

516+
<!--
517+
===========================================
518+
RemoveDuplicateAnalyzers
519+
===========================================
520+
521+
Name : RemoveDuplicateAnalyzers
522+
-->
523+
<Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
524+
<ItemGroup>
525+
<FilteredAnalyzer Include="@(Analyzer->Distinct())" />
526+
<Analyzer Remove="@(Analyzer)" />
527+
<Analyzer Include="@(FilteredAnalyzer)" />
528+
</ItemGroup>
529+
</Target>
516530

517531

518532
<!--
@@ -997,4 +1011,3 @@
9971011
<!-- End of the project file, Do not add any more propeties, items, targets etc. -->
9981012

9991013
</Project>
1000-

0 commit comments

Comments
 (0)