Skip to content

VMR repositories should receive configuration properties like OS, Arch and RID and respect them #4784

@ViktorHofer

Description

@ViktorHofer

The .NET SDK targets a specific RID, i.e. win-x64. When that SDK is being used in a vertical that should produce win-x86 assets, the wrong assets are restored.

Any component that restores RID specific assets needs to know the RID that the VMR is building for. That means any project that sets <OutputType>Exe</OutputType> or similarly WinExe, SelfContained, publishes, etc. RID specific assets are apphost packs, runtime packs and many more.

We need to the following things:

  1. Pass a set of properties into every VMR repo's build. Initially TargetOS, TargetArchitecture and TargetRuntimeIdentifier might be enough.
  2. Repositories should respect those properties. Probably the best way to achieve this is by leveraging the Arcade SDK to read from those properties and set the correct defaults. See the example below.

Arcade SDK:

<PropertyGroup>
  <!-- source-build sets the following already in a few repos that depend on live runtime, i.e. aspnetcore. -->
  <DefaultAppHostRuntimeIdentifier>$(TargetRuntimeIdentifier)</DefaultAppHostRuntimeIdentifier>

  <!-- the following might be better as it affects all packs, not just the apphost ones: -->
  <NETCoreSdkPortableRuntimeIdentifier>$(TargetRuntimeIdentifier)</NETCoreSdkPortableRuntimeIdentifier>
  <NETCoreSdkRuntimeIdentifier>$(TargetRuntimeIdentifier)</NETCoreSdkRuntimeIdentifier >
</PropertyGroup>

There are probably more properties that should be set that control what RID to use for restoring packs. @dsplaisted do we have a list of those?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions