nuke-build / nuke

🏗 The AKEless Build System for C#/.NET
https://nuke.build
MIT License
2.81k stars 350 forks source link

Add `dotnet workload` tools #1253

Closed ITaluone closed 11 months ago

ITaluone commented 11 months ago

Description

Add new tools so you can restore dotnet workloads. As I am building and publishing a dotnet maui app with NUKE I have to update my dotnet maui workloads twice: First on my dev device and second on my build server.

This doesn't feel comfortable at all.

So I propose to add the tools for dotnet workload which are:

Usage Example

Same as the "normal" nuget restore:

Target WorkloadRestore => _ => _
        .Executes(() =>
        {
            DotNetWorkloadRestore(s => s
                .SetProjectFile(Solution));
        });

Alternative

Running dotnet workload update manually local and on the build machine.

Could you help with a pull-request?

No

candoumbe commented 11 months ago

@ITaluone You could always resort to DotNet("workload ....") to run the commands you need to run.

I asked a related question on slack to add support for Stryker but got no answer so far.

matkoch commented 11 months ago

Feel free to send a pull-request.

matkoch commented 11 months ago

@candoumbe csharp is generated from json files via the GenerateTools target.

ITaluone commented 11 months ago

1255