File tree 3 files changed +21
-0
lines changed
test/Microsoft.NET.Sdk.Web.Tests 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ Copyright (c) .NET Foundation. All rights reserved.
57
57
<!-- Enable the built-in source generators. -->
58
58
<EnableRequestDelegateGenerator Condition =" '$(EnableRequestDelegateGenerator)' == ''" >true</EnableRequestDelegateGenerator >
59
59
<EnableConfigurationBindingGenerator Condition =" '$(EnableConfigurationBindingGenerator)' == ''" >true</EnableConfigurationBindingGenerator >
60
+
61
+ <!-- Default feature switch values for trimmed apps. -->
62
+ <SignalRCustomAwaitableSupport Condition =" '$(SignalRCustomAwaitableSupport)' == ''" >false</SignalRCustomAwaitableSupport >
60
63
</PropertyGroup >
61
64
62
65
<PropertyGroup >
Original file line number Diff line number Diff line change @@ -31,4 +31,19 @@ Copyright (c) .NET Foundation. All rights reserved.
31
31
<Import Sdk =" Microsoft.NET.Sdk.Web.ProjectSystem" Project =" Sdk.targets" />
32
32
33
33
<Import Sdk =" Microsoft.NET.Sdk.Publish" Project =" Sdk.targets" />
34
+
35
+ <!--
36
+ ============================================================
37
+ DefaultRuntimeHostConfigurationOptions
38
+ Defaults @(RuntimeHostConfigurationOption) items based on MSBuild properties.
39
+ ============================================================
40
+ -->
41
+
42
+ <ItemGroup >
43
+ <RuntimeHostConfigurationOption Include =" Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported"
44
+ Condition =" '$(SignalRCustomAwaitableSupport)' != ''"
45
+ Value =" $(SignalRCustomAwaitableSupport)"
46
+ Trim =" true" />
47
+ </ItemGroup >
48
+
34
49
</Project >
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ public void TrimmingOptions_Are_Defaulted_Correctly_On_Trimmed_Apps(string targe
39
39
JsonNode runtimeConfig = JsonNode . Parse ( runtimeConfigContents ) ;
40
40
JsonNode configProperties = runtimeConfig [ "runtimeOptions" ] [ "configProperties" ] ;
41
41
42
+ configProperties [ "Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported" ] . GetValue < bool > ( )
43
+ . Should ( ) . BeFalse ( ) ;
42
44
configProperties [ "System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault" ] . GetValue < bool > ( )
43
45
. Should ( ) . BeFalse ( ) ;
44
46
}
@@ -94,6 +96,7 @@ public void TrimmingOptions_Are_Defaulted_Correctly_On_Aot_Apps(string targetFra
94
96
string responseFile = Path . Combine ( outputDirectory , "native" , $ "{ projectName } .ilc.rsp") ;
95
97
var responseFileContents = File . ReadLines ( responseFile ) ;
96
98
99
+ responseFileContents . Should ( ) . Contain ( "--feature:Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported=false" ) ;
97
100
responseFileContents . Should ( ) . Contain ( "--feature:System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault=false" ) ;
98
101
responseFileContents . Should ( ) . Contain ( "--feature:System.Diagnostics.Tracing.EventSource.IsSupported=true" ) ;
99
102
responseFileContents . Should ( ) . Contain ( "--runtimeknob:System.GC.DynamicAdaptationMode=1" ) ;
You can’t perform that action at this time.
0 commit comments