Skip to content

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

Merged
rmarinho merged 1 commit into
dotnet:mainfrom
pjcollins:win-alias
Aug 23, 2023
Merged

rmarinho merged 1 commit into
dotnet:mainfrom
pjcollins:win-alias

Conversation

@pjcollins

@pjcollins pjcollins commented Aug 22, 2023 •

Copy link
Copy Markdown
Member

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

@jonathanpeppers jonathanpeppers left a comment

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.

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
Copy Markdown
Member

Not sure why the test is failin now.

@rmarinho
rmarinho merged commit 4d21500 into dotnet:main Aug 23, 2023
@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
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Aug 2, 2024
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 fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants