Skip to content

Microsoft.AspNetCore.App.runtimeconfig.json specifies runtime properties which values should not bet set by a shared framework #49486

@vitek-karas

Description

@vitek-karas

This is how the Microsoft.AspNetCore.App.runtimeconfig.json file looks like in a recent P7 build:

{
  "runtimeOptions": {
    "tfm": "net8.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "8.0.0-preview.7.23359.3"
    },
    "rollForward": "LatestPatch",
    "configProperties": {
      "System.Runtime.Loader.UseRidGraph": true,
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}

The configProperties section should not be there. They got there via the process used to generate the shared framework. ASP.NET builds what looks like a framework dependent console app and uses the output to construct the shared framework. The MetadataUpdater and BinaryFormatSerializer properties are defaults set by the SDK for console apps. They may differ for other types of apps and ASP.NET shared framework should not dictate the values on its own, it's the job of the SDK to specify the defaults (and let the user override those).
The UseRidGraph is even worse, that one comes from the workaround used in the ASP.NET repo itself introduced here: #48908 (comment). It must not be there when we ship.

Both runtime and WindowsDesktop had a similar issue for a long time now, but that has been fixed in dotnet/arcade#13844. Unfortunately ASP.NET doesn't use Arcade to build the shared framework (unlike runtime and WindowsDesktop) - see #48013.

We need to fix at least the UseRidGraph before we ship, but ideally all of the properties should be removed.

/fyi @elinor-fung @agocke

Metadata

Metadata

Assignees

Labels

area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions