-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SDK Support for new runtime feature switches #12217
Comments
Adds 3 runtimeconfig.json options introduced in .NET 5 that allow for code to be trimmed out of an application. * EventSource.IsSupported * UseSystemResourceKeys * EnableUnsafeUTF7Encoding Also fixing InvariantGlobalization so it is passed to the linker correctly. Contributes to dotnet#12217
Adds 3 runtimeconfig.json options introduced in .NET 5 that allow for code to be trimmed out of an application. * EventSource.IsSupported * UseSystemResourceKeys * EnableUnsafeUTF7Encoding Also fixing InvariantGlobalization so it is passed to the linker correctly. Contributes to #12217
@eerhardt What's the expected behavior if a setting is specified in both the .csproj and the runtimeconfig.json file? From some quick experiments it looks like the build output contains the .csproj's value rather than the .json's value. Just wanted to verify that this met your expectations. Context: the aspnet core SDK targets file will contain |
See the comment here: sdk/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRuntimeConfigurationFiles.cs Lines 163 to 166 in a5f5bb5
So yes, the intention is that the settings in the .csproj will always win over a conflicting |
…gation These feature switches were added in the runtime: * Debugger - dotnet/runtime#37288 * Http activity propagation - dotnet/runtime#38765 Fix dotnet#12217
…gation (#12457) These feature switches were added in the runtime: * Debugger - dotnet/runtime#37288 * Http activity propagation - dotnet/runtime#38765 Fix #12217
We are introducing new runtime options in dotnet/runtime to allow unnecessary code to be trimmed in size sensitive apps (Blazor, Xamarin).
To complete this experience we should add a
RuntimeHostConfigurationOption
and MSBuild property to set each feature switch. For example:Feature switches being added to dotnet/runtime:
We also should add
Trim='true'
for theSystem.Globalization.Invariant
RuntimeHostConfigurationOption so the non-invariant globalization code can be trimmed.The text was updated successfully, but these errors were encountered: