<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">
</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