diff --git a/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets b/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets
index e5341d39048b..40c90c1ec47a 100644
--- a/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets
+++ b/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets
@@ -60,6 +60,7 @@ Copyright (c) .NET Foundation. All rights reserved.
false
+ false
diff --git a/src/WebSdk/Web/Targets/Sdk.Server.targets b/src/WebSdk/Web/Targets/Sdk.Server.targets
index f99e6a0a7e8f..e4cf1018f4ad 100644
--- a/src/WebSdk/Web/Targets/Sdk.Server.targets
+++ b/src/WebSdk/Web/Targets/Sdk.Server.targets
@@ -44,6 +44,10 @@ Copyright (c) .NET Foundation. All rights reserved.
Condition="'$(SignalRCustomAwaitableSupport)' != ''"
Value="$(SignalRCustomAwaitableSupport)"
Trim="true" />
+
diff --git a/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs b/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs
index c2b7c03288e6..6a69e3acfff2 100644
--- a/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs
+++ b/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs
@@ -41,6 +41,8 @@ public void TrimmingOptions_Are_Defaulted_Correctly_On_Trimmed_Apps(string targe
configProperties["Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported"].GetValue()
.Should().BeFalse();
+ configProperties["Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported"].GetValue()
+ .Should().BeFalse();
configProperties["System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault"].GetValue()
.Should().BeFalse();
}
@@ -97,6 +99,7 @@ public void TrimmingOptions_Are_Defaulted_Correctly_On_Aot_Apps(string targetFra
var responseFileContents = File.ReadLines(responseFile);
responseFileContents.Should().Contain("--feature:Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported=false");
+ responseFileContents.Should().Contain("--feature:Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported=false");
responseFileContents.Should().Contain("--feature:System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault=false");
responseFileContents.Should().Contain("--feature:System.Diagnostics.Tracing.EventSource.IsSupported=true");
responseFileContents.Should().Contain("--runtimeknob:System.GC.DynamicAdaptationMode=1");