Skip to content

Commit ac60f15

Browse files
captainsafialayomia
authored andcommitted
Move to granular opt-in for interceptors preview (#35024)
1 parent 40fb61b commit ac60f15

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ Copyright (c) .NET Foundation. All rights reserved.
5959
<EnableConfigurationBindingGenerator Condition="'$(EnableConfigurationBindingGenerator)' == ''">true</EnableConfigurationBindingGenerator>
6060
</PropertyGroup>
6161

62-
<!-- Enable the interceptors compiler feature by default for projects that use the RequestDelegateGenerator or the ConfigurationBindingGenerator. -->
63-
<PropertyGroup Condition="'$(EnableRequestDelegateGenerator)' == 'true' Or '$(EnableConfigurationBindingGenerator)' == 'true'">
64-
<Features>$(Features);InterceptorsPreview</Features>
62+
<PropertyGroup>
63+
<!-- Set the namespaces emitted by the RequestDelegateGenerator for interception when applicable. -->
64+
<InterceptorsPreviewNamespaces Condition="'$(EnableRequestDelegateGenerator)' == 'true'">$(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated</InterceptorsPreviewNamespaces>
65+
<!-- Set the namespaces emitted by the ConfigurationBindingGenerator for interception when applicable. -->
66+
<InterceptorsPreviewNamespaces Condition="'$(EnableConfigurationBindingGenerator)' == 'true'">$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>
6567
</PropertyGroup>
6668

6769
<!--

0 commit comments

Comments
 (0)