|
435 | 435 | <_IntermediateOutputPathNoTargetFrameworkOrRID>$([System.Text.RegularExpressions.Regex]::Replace($(_IntermediateOutputPathNoTargetFrameworkOrRID), "$(TargetFramework)\\$",, System.Text.RegularExpressions.RegexOptions.IgnoreCase))</_IntermediateOutputPathNoTargetFrameworkOrRID> |
436 | 436 | </PropertyGroup> |
437 | 437 |
|
438 | | - <ItemGroup> |
439 | | - <!-- Include analyzers that are coming from a FrameworkReference in the temporary target assembly project. --> |
440 | | - <_TemporaryTargetAssemblyAnalyzer Include="@(Analyzer)" Condition="'%(Analyzer.FrameworkReferenceName)' != ''" /> |
441 | | - </ItemGroup> |
442 | | - |
443 | 438 | <!-- Use the legacy .NET Framework/.NET Core 3.0 GenerateTemporaryTargetAssembly path if 'IncludePackageReferencesDuringMarkupCompilation' is 'false',. --> |
444 | 439 | <GenerateTemporaryTargetAssembly |
445 | 440 | CurrentProject="$(MSBuildProjectFullPath)" |
|
455 | 450 | CompileTargetName="$(_CompileTargetNameForLocalType)" |
456 | 451 | GenerateTemporaryTargetAssemblyDebuggingInformation="$(GenerateTemporaryTargetAssemblyDebuggingInformation)" |
457 | 452 | IncludePackageReferencesDuringMarkupCompilation="$(IncludePackageReferencesDuringMarkupCompilation)" |
458 | | - Analyzers="@(_TemporaryTargetAssemblyAnalyzer)" |
| 453 | + Analyzers="@(Analyzer)" |
459 | 454 | TemporaryTargetAssemblyProjectName="$(_TemporaryTargetAssemblyProjectName)" |
460 | 455 | MSBuildProjectExtensionsPath="$(MSBuildProjectExtensionsPath)" |
461 | 456 | > |
|
491 | 486 | Condition="Exists('%(Fullpath)')" /> |
492 | 487 | </Target> |
493 | 488 |
|
| 489 | + <!-- |
| 490 | + =========================================== |
| 491 | + RemoveDuplicateAnalyzers |
| 492 | + =========================================== |
| 493 | +
|
| 494 | + Name : RemoveDuplicateAnalyzers |
| 495 | + --> |
| 496 | + <Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile"> |
| 497 | + <ItemGroup> |
| 498 | + <FilteredAnalyzer Include="@(Analyzer->Distinct())" /> |
| 499 | + <Analyzer Remove="@(Analyzer)" /> |
| 500 | + <Analyzer Include="@(FilteredAnalyzer)" /> |
| 501 | + </ItemGroup> |
| 502 | + </Target> |
494 | 503 |
|
495 | 504 | <!-- |
496 | 505 | ================================================================ |
|
0 commit comments