Skip to content

Conversation

@joeloff
Copy link
Member

@joeloff joeloff commented Nov 9, 2022

We should always add the platform moniker to the generated workload pack MSI. We previously avoided this if the package for the workload pack contained the platform to avoid repeating platform information multiple times.

However, when using aliasing, e.g. taking an x64 pack and repurposing it for arm64, etc. we now end up with duplicate file names that results in conflicts when generating the visual studio manifests.

For example, a manifest like

  "workloads": {
    "microsoft-net-runtime-android-aot": {
      "description": "Android Mono AOT Workload",
      "packs": [
        "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64"
      ],
      "platforms": [ "win-x64", "win-arm64", "linux-x64", "osx-x64", "osx-arm64" ]
    }
  },
  "packs": {
    "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64": {
      "kind": "Sdk",
      "version": "6.0.11-mauiarm",
      "alias-to": {
        "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64",
        "win-arm64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64",
        "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64",
        "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64",
        "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64"
      }
    }

would generate a single MSI named Microsoft.AOT.win-x64.Cross.android-arm64.6.0.11-mauiarm.msi. With this change, we'll generate two MSIs instead.

Microsoft.AOT.win-x64.Cross.android-arm64.6.0.11-mauiarm-arm64.msi
Microsoft.AOT.win-x64.Cross.android-arm64.6.0.11-mauiarm-x64.msi

@nagilson nagilson changed the title Add platform moniker to wokrload pack MSI Add platform moniker to workload pack MSI Nov 10, 2022
@nagilson
Copy link
Member

Does this need any change in the SDK Resolver for potential new workload names if the platform moniker is duplicated at the end now?

@joeloff
Copy link
Member Author

joeloff commented Nov 10, 2022

Does this need any change in the SDK Resolver for potential new workload names if the platform moniker is duplicated at the end now?

It shouldn't. This only impacts the name of the MSI file itself. We have a standard pattern for the workload pack package that wraps the MSI that's derived from the original workload pack. That is what the CLI uses to locate the installer for the pack.

@joeloff
Copy link
Member Author

joeloff commented Nov 11, 2022

@mmitche Can you please help to merge? We verified the fix in a VS build

@mmitche mmitche merged commit a0fd54b into dotnet:release/6.0 Nov 11, 2022
joeloff added a commit to joeloff/arcade that referenced this pull request Nov 11, 2022
joeloff added a commit to joeloff/arcade that referenced this pull request Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants