WPF 源生成器报错的解决方案

解决方案

在项目文件中添加

 1 <!-- https://github.com/dotnet/wpf/pull/6680#issuecomment-1183552170 -->
 2 <Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
 3   <RemoveDuplicates Inputs="@(Analyzer)">
 4     <Output TaskParameter="Filtered" ItemName="FilteredAnalyzer"/>
 5   </RemoveDuplicates>
 6   <ItemGroup>
 7     <Analyzer Remove="@(Analyzer)" />
 8     <Analyzer Include="@(FilteredAnalyzer)" />
 9   </ItemGroup>
10 </Target>

 

posted @ 2022-08-13 22:28  只吃肉不喝酒  阅读(92)  评论(0编辑  收藏  举报