Skip to content

Update SWIX generation#10582

Merged
mmitche merged 6 commits intodotnet:release/6.0from
joeloff:swixfix
Sep 7, 2022
Merged

Update SWIX generation#10582
mmitche merged 6 commits intodotnet:release/6.0from
joeloff:swixfix

Conversation

@joeloff
Copy link
Copy Markdown
Member

@joeloff joeloff commented Aug 25, 2022

Various fixes for SWIX projects for workloads.

  • Ensure relative package paths only include properties that are defined
  • Add machineArch property and support for arm64. Manifests that do not support arm64 will no longer generate SWIX packages for the arm64 MSI. Previously we always set chip to the MSI platform, generating invalid SWIX: vs.package.chip=arm64
  • Don't set the productArch property for SWIX projects. It's unnecessary for workloads and increases the relative path for the package cache.
  • Add more tests

dsplaisted
dsplaisted previously approved these changes Aug 25, 2022
Comment thread src/Microsoft.DotNet.Build.Tasks.Workloads/src/Strings.resx Outdated
@joeloff joeloff marked this pull request as draft September 1, 2022 04:17
@joeloff joeloff changed the title Fix SWIX projects for workloads Update SWIX generation Sep 1, 2022
@joeloff joeloff marked this pull request as ready for review September 1, 2022 19:54
if (!string.IsNullOrEmpty(MachineArch))
{
msiWriter.WriteLine($" vs.package.machineArch={MachineArch}");
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If these are mutually exclusive, would it make sense to error out if the wrong combinations are set?

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.

Visual Studio does allow you to set all three, though there are some combinations that would never make sense. I'll have a chat with VS to confirm if they are validating anything, but I think it would be good to guard against invalid combinations on our side. We have implemented other checks to catch issues early, otherwise we only see it when the packages flow to VS and at that point, a fix requires rebuilding the whole stack from the runtime. Thanks for the suggestion.

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 checked with VS, there are no explicit validations. They simply trim out invalid items that cannot be installed.

@joeloff
Copy link
Copy Markdown
Member Author

joeloff commented Sep 6, 2022

Any more concerns on the PR? @mmitche can you please help merge this once folks have signed off.

I'm in the process of prepping the dotnet/runtime PRsand we can port this to 7.0 ASAP to unblock the next round of insertions and servicing.

@joeloff
Copy link
Copy Markdown
Member Author

joeloff commented Sep 7, 2022

@mmitche can you maybe go ahead and merge this. We have tests covering the changes and I've tested it with 6.0 builds of runtime as well. We need to get the code flows into runtime to unblock things for the next servicing release.

@mmitche mmitche merged commit 60eeccd into dotnet:release/6.0 Sep 7, 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