Skip to content

IsDynamicCodeCompiled path no longer being trimmed in 6.0.100-alpha.1.21062.9 #1747

@tannergooding

Description

@tannergooding

Repro

  1. Install v6.0.100-alpha.1.21062.9 of the SDK from dotnet/installer.
  2. Create a new blazorwasm project: dotnet new blazorwasm
  3. Publish the project with trimming: dotnet publish -c Release (optionally dump the dependencies with /p:_TrimmerDumpDependencies=true
  4. Examine the Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider method in Microsoft.Extensions.DependencyInjection.dll
  5. See that the call to RuntimeFeature.IsDynamicCodeCompiled still exists as does the path that invokes new DynamicServiceProviderEngine(services)

Expected behavior

RuntimeFeature.IsDynamicCodeCompiled should be false (it is in the S.P.Corelib assembly) and the code path handling DynamicServiceProviderEngine should have been trimmed.

Actual Behavior

It is not trimmed which is causing System.Reflection.Emit to not be trimmed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions