maui: Workload sets don't seem to work for pinning a MAUI version (in DevOps)

Description

Following #24892, I’ve tried using Workload Sets as documented here.

However, when configuring our DevOps pipeline to use workload sets, we’re getting the following output and error.

C:\hostedtoolcache\windows\dotnet\dotnet.exe workload install maui --version 8.0.21

Successfully updated workload install mode to use workload-set. Installing workload version 8.0.21. Workload installation failed. Rolling back installed packs… Workload installation failed: Failed to install workload version 8.0.21: Version 8.21.0 of package microsoft.net.workloads.8.0.0 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages".

Is this a known problem? Or am I ‘doing it wrong’?

I have not tried using locally - only in DevOps.

Steps to Reproduce

  1. Create a DevOps pipeline template to install MAUI:
 - task: DotNetCoreCLI@2
   displayName: Install MAUI
   inputs:
     command: 'custom'
     custom: 'workload'
     arguments: 'install maui $(WorkloadArguments)'
  1. Set the DevOps WorkloadArguments variable to “–version 8.0.21”
  2. Run a pipeline which uses the template.

Link to public reproduction project repository

No response

Version with bug

9.0.0-rc.1.24453.9

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

n/a

Did you find any workaround?

No.

Relevant log output

C:\hostedtoolcache\windows\dotnet\dotnet.exe workload install maui --version 8.0.21

Successfully updated workload install mode to use workload-set.
Installing workload version 8.0.21.
Workload installation failed. Rolling back installed packs...
Workload installation failed: Failed to install workload version 8.0.21: Version 8.21.0 of package microsoft.net.workloads.8.0.0 is not found in NuGet feeds https://api.nuget.org/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\".

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Maybe my last question…

So back to the original version I wanted to use. Do those ‘in the know’ know which workload set contains MAUI 8.0.21?

Or is 8.0.21 too old to be in a workload set?

Edit - I think we’re happy to go up to 8.0.82, just need to convince the customer/team that it’s worth the update (which I think it is).

Using 8.0.402 (dotnet workload install maui --version 8.0.402) does work and installs MAUI workload 8.0.82. So the confusion is with the version parameter used, that is about the workload set and not with the workload version it self.