Skip to content
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

[release/6.0] wasm-tools: Fix workload manifest MSI ProductVersion generation #90994

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

joeloff
Copy link
Member

@joeloff joeloff commented Aug 23, 2023

Description

Manifest installers for .NET optional workloads rely on performing major upgrades in .NET 6 and 7. This requires that the MSI version increments for new builds. The MSI version was generated using the assembly version. MSI versions should be generated using the major/minor/patch/buildnumber, e.g. 6.0.20.12345. Because the assembly version was being used, the patch value was always set to 0. Due to the bit masking and shift operations used to construct the MSI version, the 3rd part of the version number wrapped around, generating a smaller version for a newer release. MSI ProductVersion is only 32-bits in size (8-bit major, 8-bit minor and 16-bit build number).

For 6.0.21, the ProductVersion generated using the old method was 48.3.64667 and for 6.0.22 it generated 48.0.763.

Impact

  1. Visual Studio PR checks fail package validation because the new MSI's version is lower than the baseline copy from the previous insertion.
  2. The CLI will block installing the newer manifest when trying to update workloads because it will detect a possible downgrade.

Testing

No unit tests for this. Validated using Orca to ensure the manifest MSI's ProductVersion matches the version we generate for other runtime MSIs.

image

The generated component manifest for the wasm-tools workload in Visual Studio using an internal build was also validated. The component uses the runtime's AssemblyFileVersion as it can rely on a standard 4-part version number.

{
  "manifestVersion": "1.1",
  "info": {
    "id": "wasm.tools,version=6.0.2223.42217"
  },
  "packages": [
    {
      "id": "wasm.tools",
      "version": "6.0.2223.42217",
      "type": "Component",
      "dependencies": {
        "microsoft.net.runtime.mono.tooling": {
          "version": "1.0.0.0",
          "behaviors": "IgnoreApplicabilityFailures"
        },

@joeloff joeloff added the Servicing-consider Issue for next servicing release review label Aug 23, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 23, 2023
@ghost ghost assigned joeloff Aug 23, 2023
@joeloff joeloff added area-Workloads Workloads like wasm-tools and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 23, 2023
@mmitche mmitche merged commit fb2b438 into dotnet:release/6.0 Aug 24, 2023
172 of 180 checks passed
@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Workloads Workloads like wasm-tools Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants