Skip to content

Update workload pack tasks#7614

Merged
joeloff merged 7 commits intodotnet:mainfrom
joeloff:workloads10
Jul 14, 2021
Merged

Update workload pack tasks#7614
joeloff merged 7 commits intodotnet:mainfrom
joeloff:workloads10

Conversation

@joeloff
Copy link
Copy Markdown
Member

@joeloff joeloff commented Jul 13, 2021

  • Extract ProductLanguage into JSON manifest - these will be needed in the CLI to detect related products when dealing with upgrades for manifest MSIs
  • Remove icon file from generated csproj
  • Only add pack dependencies if they exist

@joeloff joeloff requested a review from pjcollins July 13, 2021 20:12
@joeloff
Copy link
Copy Markdown
Member Author

joeloff commented Jul 13, 2021

@pjcollins hold off on reviewing, there's another fix that needs to go into this to extract more information we need in the CLI

Comment thread src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs
@joeloff
Copy link
Copy Markdown
Member Author

joeloff commented Jul 14, 2021

Here's a sample of what the new metadata will look like. We're extracting the Upgrade table (if present). Otherwise, we need to make make DB calls to extract the information from the MSI at install time and that would add a lot more complexity to the CLI logic. @dsplaisted as an FYI

So turning this

image

into

"RelatedProducts": [
        {
            "UpgradeCode": "{08747630-CB79-3B55-860C-EBEE4EE0C769}",
            "VersionMin": null,
            "VersionMax": {
                "Major": 1,
                "Minor": 2,
                "Build": 2,
                "Revision": -1,
                "MajorRevision": -1,
                "MinorRevision": -1
            },
            "Language": "1033",
            "Attributes": 1
        },
        {
            "UpgradeCode": "{08747630-CB79-3B55-860C-EBEE4EE0C769}",
            "VersionMin": {
                "Major": 1,
                "Minor": 2,
                "Build": 2,
                "Revision": -1,
                "MajorRevision": -1,
                "MinorRevision": -1
            },
            "VersionMax": null,
            "Language": "1033",
            "Attributes": 2
        }
    ]

writer.WriteElementString("PackageId", $"{nupkg.Id}.Msi.{platform}");
writer.WriteElementString("PackageVersion", $"{nupkg.Version}");
writer.WriteElementString("Description", nupkg.Description);
writer.WriteElementString("PackageIcon", "Icon.png");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might have to define an empty "PackageIcon" property so that Arcade doesn't provide defaults and then adds the item group for you.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran under Arcade SDK in dotnet/installer and it seems to work, but I will condition the target

Copy link
Copy Markdown
Member

@chcosta chcosta Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works, that's great. I wouldn't think the target would need a condition. I just thought you would have to undefine packageicon in your project to prevent this from executing because Arcade just default defines it here. Perhaps I'm missing something though.

Copy link
Copy Markdown
Member

@pjcollins pjcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest icon related changes appear to be working for me.

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.

3 participants