runner-images
runner-images copied to clipboard
Update/Add dotnet workloads
Tool name
dotnet workload
Tool license
MIT
Add or update?
- [X] Add
- [ ] Update
Desired version
latest
Approximate size
No response
Brief description of tool
I build a MAUI application on both GitHub Actions and Azure DevOps. A large part of my build is spent installing the workloads for MAUI on the appropriate VM. Ideally, the workloads could be pre-installed in the VM. This would save Azure and GitHub a lot of build time for projects which require these workloads.
Thanks.
Installed Workload Ids Installation Source
wasm-tools SDK 6.0.300
macos SDK 6.0.300
maui-maccatalyst SDK 6.0.300
maui-ios SDK 6.0.300
maui-android SDK 6.0.300
ios SDK 6.0.300
maccatalyst SDK 6.0.300
maui SDK 6.0.300
tvos SDK 6.0.300
android SDK 6.0.300
URL for tool's homepage
https://github.com/dotnet/runtime/tree/main/src/workloads
Provide a basic test case to validate the tool's functionality.
No response
Platforms where you need the tool
- [X] Azure DevOps
- [X] GitHub Actions
Virtual environments where you need the tool
- [X] Ubuntu 18.04
- [X] Ubuntu 20.04
- [X] Ubuntu 22.04
- [X] macOS 10.15
- [X] macOS 11
- [X] macOS 12
- [X] Windows Server 2019
- [X] Windows Server 2022
Can this tool be installed during the build?
Yes.
dotnet workload install XXX
Tool installation time in runtime
up to 2.5 minutes on Mac
Are you willing to submit a PR?
I think it makes sense for dotnet or maui teams to handle.
Hello @SteveBush, thank you for your request. We will take a look and get back to you.
@SteveBush one of the problem here is that dotnet workload install
is introduced in .Net 6.x, which is available only for Ubuntu20,22 & Windows2022 by default. For other OSs it can be installed using either using task for azdo or action for gh actions .
@timheuer could you please assist? Does it make sense to add the workloads to the images that have .Net 6 pre-installed?
Let me do a discussion with the team. Workloads (especially those with the bindings to iOS/Android can also update out-of-band so it may not follow the same versioning timeframes as the SDK itself, thus making this require a bit more management. Workloads were designed to be flexible in this regard to the consumers.
From a developer's perspective, I waste a lot of my build time installing and updating the workloads. As more developers move to build on net6.X and MAUI, the compute time spent installing and updating workloads will increase pipeline build times for everyone. As you evaluate the management complexity of taking on workloads, please consider developer and build minutes savings. You could probably pay for a developer or two with the compute savings alone. :)
On thought, is maybe there two flavors of an agent: latest and stable. The latest has a regular (daily, weekly) update mechanism to call dotnet workload install. You can publish the results using the dotnet workload list command:
PS /Users/stevebu/Downloads> dotnet workload list
Installed Workload Ids Installation Source
-----------------------------------------------
wasm-tools SDK 6.0.300
macos SDK 6.0.300
maui-maccatalyst SDK 6.0.300
maui-ios SDK 6.0.300
maui-android SDK 6.0.300
ios SDK 6.0.300
maccatalyst SDK 6.0.300
maui SDK 6.0.300
tvos SDK 6.0.300
android SDK 6.0.300
Thanks for investigating.
@SteveBush -- so for windows-2022
agent, when that image updates to the released Visual Studio 2022 build that has the MAUI GA tools, it will get those workloads. For ubuntu-latest
agent it wouldn't make sense I don't think to have the MAUI workloads by default. wasm-tools
here might be the difference for that agent.
Closing this as windows image will receive the tools eventually and for ubuntu we wouldn't like to add it as Tim mentioned.