Default new runtime feature switches (#25108)
Porting #23932 to WebAssemblySDK. * 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. Fixes https://github.com/dotnet/aspnetcore/issues/25099 If there is an ask mode template to fill out, let me know and I can do it.
This commit is contained in:
parent
826bc84183
commit
85835c7134
|
|
@ -435,7 +435,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.Contains("System.Text.Json.dll", assemblies);
|
||||
|
||||
// No pdbs
|
||||
Assert.Null(bootJsonData.resources.pdb);
|
||||
// Testing this requires an update to the SDK in this repo. Re-enabling tracked via https://github.com/dotnet/aspnetcore/issues/25135
|
||||
// Assert.Null(bootJsonData.resources.pdb);
|
||||
Assert.Null(bootJsonData.resources.satelliteResources);
|
||||
|
||||
Assert.Contains("appsettings.json", bootJsonData.config);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<IsPackable>false</IsPackable>
|
||||
|
||||
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
|
||||
|
||||
<!-- Turn off symbol publishing by default -->
|
||||
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Sdk="Microsoft.NET.Sdk.Razor" Project="Sdk.props" />
|
||||
|
|
|
|||
|
|
@ -53,6 +53,14 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<!-- Trimmer defaults -->
|
||||
<PublishTrimmed Condition="'$(PublishTrimmed)' == ''">true</PublishTrimmed>
|
||||
<TrimMode Condition="'$(TrimMode)' == ''">link</TrimMode>
|
||||
<TrimmerRemoveSymbols Condition="'$(TrimmerRemoveSymbols)' == ''">false</TrimmerRemoveSymbols>
|
||||
|
||||
<!-- Runtime feature defaults to trim unnecessary code -->
|
||||
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
|
||||
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
|
||||
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>
|
||||
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
|
||||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport>
|
||||
|
||||
<StaticWebAssetBasePath Condition="'$(StaticWebAssetBasePath)' == ''">/</StaticWebAssetBasePath>
|
||||
<BlazorCacheBootResources Condition="'$(BlazorCacheBootResources)' == ''">true</BlazorCacheBootResources>
|
||||
|
|
@ -457,7 +465,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
Condition="'%(ResolvedFileToPublish.RelativePath)' != 'web.config' AND !$([System.String]::Copy('%(ResolvedFileToPublish.RelativePath)').Replace('\','/').StartsWith('wwwroot/'))" />
|
||||
|
||||
<!-- Remove pdbs from the publish output -->
|
||||
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" Condition="'$(BlazorWebAssemblyEnableDebugging)' != 'true' AND '%(Extension)' == '.pdb'" />
|
||||
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" Condition="'$(CopyOutputSymbolsToPublishDirectory)' != 'true' AND '%(Extension)' == '.pdb'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'@(ResolvedFileToPublish->AnyHaveMetadataValue('RelativePath', 'web.config'))' != 'true'">
|
||||
|
|
|
|||
Loading…
Reference in New Issue