Skip to content

Commit

Permalink
Fixing logging generator not getting removed in web projects (#4287)
Browse files Browse the repository at this point in the history
* Fixing logging generator not getting removed in web projects

* Addressing PR Feedback
  • Loading branch information
joperezr authored Aug 16, 2023
1 parent 3cd89f3 commit 171c0df
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
<Project>
<!-- This package should replace the Microsoft.Extensions.Logging.Abstractions source generator. -->
<Target Name="_Microsoft_Extensions_Logging_AbstractionsRemoveAnalyzers"
Condition="'$(DisableMicrosoftExtensionsLoggingSourceGenerator)' == 'true'"
AfterTargets="ResolveReferences">
<ItemGroup>
<_Microsoft_Extensions_Logging_AbstractionsAnalyzer Include="@(Analyzer)" Condition="'%(Analyzer.AssemblyName)' == 'Microsoft.Extensions.Logging.Generators' Or
'%(Analyzer.NuGetPackageId)' == 'Microsoft.Extensions.Logging.Abstractions'" />
</ItemGroup>

<!-- Remove Microsoft.Extensions.Logging.Abstractions Analyzer -->
<ItemGroup>
<Analyzer Remove="@(_Microsoft_Extensions_Logging_AbstractionsAnalyzer)" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 171c0df

Please sign in to comment.