Skip to content

Commit 427bfc8

Browse files
authored
Default new runtime feature switches (#23932) (#23987)
* Default new runtime feature switches These new feature switches have been added to the runtime to make applications smaller. Setting reasonable defaults to Blazor wasm projects. Fix #23716 * PR feedback
1 parent 30ded54 commit 427bfc8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Components.Wasm.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Copyright (c) .NET Foundation. All rights reserved.
2525
<!-- Trimmer defaults -->
2626
<PublishTrimmed Condition="'$(PublishTrimmed)' == ''">true</PublishTrimmed>
2727
<TrimMode Condition="'$(TrimMode)' == ''">link</TrimMode>
28+
<TrimmerRemoveSymbols Condition="'$(TrimmerRemoveSymbols)' == ''">false</TrimmerRemoveSymbols>
29+
30+
<!-- Runtime feature defaults to trim unnecessary code -->
31+
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
32+
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
33+
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>
34+
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
35+
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' == 'Release'">false</DebuggerSupport>
2836

2937
<StaticWebAssetBasePath Condition="'$(StaticWebAssetBasePath)' == ''">/</StaticWebAssetBasePath>
3038
<BlazorCacheBootResources Condition="'$(BlazorCacheBootResources)' == ''">true</BlazorCacheBootResources>
@@ -414,7 +422,7 @@ Copyright (c) .NET Foundation. All rights reserved.
414422
Condition="'%(ResolvedFileToPublish.RelativePath)' != 'web.config' AND !$([System.String]::Copy('%(ResolvedFileToPublish.RelativePath)').Replace('\','/').StartsWith('wwwroot/'))" />
415423

416424
<!-- Remove pdbs from the publish output -->
417-
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" Condition="'$(BlazorWebAssemblyEnableDebugging)' != 'true' AND '%(Extension)' == '.pdb'" />
425+
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" Condition="'$(DebuggerSupport)' == 'false' AND '%(Extension)' == '.pdb'" />
418426
</ItemGroup>
419427

420428
<ItemGroup Condition="'@(ResolvedFileToPublish->AnyHaveMetadataValue('RelativePath', 'web.config'))' != 'true'">

0 commit comments

Comments
 (0)