Skip to content

Commit

Permalink
Register off-by-default analyzer: configuration binding generator (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
layomia authored Apr 18, 2023
1 parent 2c39026 commit 502684e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,16 @@ Copyright (c) .NET Foundation. All rights reserved.
<Target Name="ResolveOffByDefaultAnalyzers" AfterTargets="ResolveTargetingPackAssets"
Condition="'@(FrameworkReference)' != ''">
<ItemGroup>
<OffByDefaultAnalyzer Include="Microsoft.AspNetCore.Http.RequestDelegateGenerator"
<OffByDefaultAnalyzer Include="Microsoft.AspNetCore.Http.RequestDelegateGenerator.dll"
IsEnabled="$(EnableRequestDelegateGenerator)"/>
<OffByDefaultAnalyzer Include="Microsoft.Extensions.Configuration.Binder.SourceGeneration.dll"
IsEnabled="$(EnableConfigurationBindingGenerator)"/>
</ItemGroup>

<ItemGroup>
<AnalyzerToRemove Include="@(OffByDefaultAnalyzer)"
Path="%(Analyzer.Identity)"
Condition="'%(Analyzer.Filename)' == '@(OffByDefaultAnalyzer)'" />
</ItemGroup>

<ItemGroup>
<Analyzer Remove="%(AnalyzerToRemove.Path)" Condition="'%(AnalyzerToRemove.IsEnabled)' != 'true'"/>
<Analyzer Remove="@(OffByDefaultAnalyzer)"
Condition="'%(OffByDefaultAnalyzer.IsEnabled)' != 'true'"
MatchOnMetadata="FileName" />
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<PropertyGroup Condition="'$(PublishAot)' == 'true'">
<EnableRequestDelegateGenerator Condition="'$(EnableRequestDelegateGenerator)' == ''">true</EnableRequestDelegateGenerator>
<EnableConfigurationBindingGenerator Condition="'$(EnableConfigurationBindingGenerator)' == ''">true</EnableConfigurationBindingGenerator>
</PropertyGroup>

<!--
Expand Down

0 comments on commit 502684e

Please sign in to comment.