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

[workload] Only install the WinUI pack on Windows #16937

Merged
merged 1 commit into from Aug 23, 2023

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Aug 22, 2023

When building on macOS I've been hitting a workload install issue:

Workload installation failed. Rolling back installed packs...
  Rolling back pack Microsoft.Maui.Graphics.Win2D.WinUI.Desktop installation...
  Workload installation failed: microsoft.maui.graphics.win2d.winui.desktop::7.0.100-dev is not found in NuGet feeds ...

The project that produces this pack doesn't seem to be built on macOS,
and it's not available in the local artifacts feed after a build.

We can take advantage of alias packs to fix this issue. This will
also simplify workload installs for customers not on Windows, as the
pack will now be ignored entirely on other platforms.

When building on macOS I've been hitting a workload install issue:

    Workload installation failed. Rolling back installed packs...
      Rolling back pack Microsoft.Maui.Graphics.Win2D.WinUI.Desktop installation...
      Workload installation failed: microsoft.maui.graphics.win2d.winui.desktop::7.0.100-dev is not found in NuGet feeds ...

The project that produces this pack doesn't seem to be built on macOS,
and it's not available in the local artifacts feed after a build.

We can take advantage of [alias packs][0] to fix this issue.  This will
also simplify workload installs for customers not on Windows, as the
pack will now be ignored entirely on other platforms.

[0]: https://github.com/dotnet/designs/blob/37718c66f403f7a5d25517cdac3ec2d2553100a6/accepted/2020/workloads/workload-manifest.md#alias-packs
@pjcollins pjcollins requested a review from a team as a code owner August 22, 2023 20:17
@pjcollins pjcollins added the area/setup 🪄 Installation, setup, requirements, maui-check, workloads, platform support label Aug 22, 2023
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

Ok, I see why this is needed:

  • dotnet workload install maui depends on
  • maui-desktop depends on
  • maui-windows

So, this means we effectively install maui-windows on all platforms: macOS, linux, etc.

You probably don't need Microsoft.Maui.Graphics.Win2D.WinUI.Desktop on macOS or linux. It's not possible to build a WindowsAppSDK app on those platforms.

@rmarinho
Copy link
Member

Not sure why the test is failin now.

@rmarinho rmarinho merged commit 4d21500 into dotnet:main Aug 23, 2023
34 checks passed
@pjcollins pjcollins deleted the win-alias branch August 23, 2023 15:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/setup 🪄 Installation, setup, requirements, maui-check, workloads, platform support platform/windows 🪟
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants