Skip to content

Commit

Permalink
[release/8.0] Enable interceptors implicitly in binder gen nupkg when…
Browse files Browse the repository at this point in the history
… generator is enabled (#91559)

* Enable interceptors implicitly in binder gen nupkg when generator is enabled

* Simplify impl & remove unneeded target

---------

Co-authored-by: Layomi Akinrinade <laakinri@microsoft.com>
  • Loading branch information
github-actions[bot] and layomia authored Sep 6, 2023
1 parent 1222f14 commit e500806
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<Project InitialTargets="NETStandardCompatError_Microsoft_Extensions_Configuration_Binder">
<Target Name="_Microsoft_Extensions_Configuration_BinderRemoveAnalyzer"
<PropertyGroup Condition="'$(EnableConfigurationBindingGenerator)' == 'true'">
<!-- The configuration binding source generator uses a preview version of the compiler interceptors feature. Enable it implicitly when the generator is enabled. -->
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>
</PropertyGroup>

<Target Name="_Microsoft_Extensions_Configuration_Binder_RemoveAnalyzer"
Condition="'$(EnableConfigurationBindingGenerator)' != 'true'"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets">

Expand All @@ -8,8 +13,8 @@
</ItemGroup>
</Target>

<Target Name="NETStandardCompatError_Microsoft_Extensions_Configuration_Binder"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Target Name="NETStandardCompatError_Microsoft_Extensions_Configuration_Binder"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<PropertyGroup>
<_Microsoft_Extensions_Configuration_Binder_Compatible_TargetFramework
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp2.0')) AND
Expand Down

0 comments on commit e500806

Please sign in to comment.