Microsoft.Extensions.Logging.Abstractions.targets 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. <Project>
  2. <Target Name="_Microsoft_Extensions_Logging_AbstractionsGatherAnalyzers">
  3. <ItemGroup>
  4. <_Microsoft_Extensions_Logging_AbstractionsAnalyzer Include="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)' == 'Microsoft.Extensions.Logging.Abstractions'" />
  5. </ItemGroup>
  6. </Target>
  7. <Target Name="_Microsoft_Extensions_Logging_AbstractionsAnalyzerMultiTargeting"
  8. Condition="'$(SupportsRoslynComponentVersioning)' != 'true'"
  9. AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
  10. DependsOnTargets="_Microsoft_Extensions_Logging_AbstractionsGatherAnalyzers">
  11. <ItemGroup>
  12. <!-- Remove our analyzers targeting roslyn4.x -->
  13. <Analyzer Remove="@(_Microsoft_Extensions_Logging_AbstractionsAnalyzer)"
  14. Condition="$([System.String]::Copy('%(_Microsoft_Extensions_Logging_AbstractionsAnalyzer.Identity)').IndexOf('roslyn4')) &gt;= 0"/>
  15. </ItemGroup>
  16. </Target>
  17. <Target Name="_Microsoft_Extensions_Logging_AbstractionsRemoveAnalyzers"
  18. Condition="'$(DisableMicrosoftExtensionsLoggingSourceGenerator)' == 'true'"
  19. AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
  20. DependsOnTargets="_Microsoft_Extensions_Logging_AbstractionsGatherAnalyzers">
  21. <!-- Remove all our analyzers -->
  22. <ItemGroup>
  23. <Analyzer Remove="@(_Microsoft_Extensions_Logging_AbstractionsAnalyzer)" />
  24. </ItemGroup>
  25. </Target>
  26. </Project>