v0.6.0-beta6: Complete .NET Workload Management
·
801 commits
to master
since this release
TimeWarp.Cli v0.6.0-beta6 - Complete .NET Workload Management
π Major New Feature: Complete DotNet.Workload() API
π¦ All 10 Workload Commands Implemented
DotNet.Workload().Info()- Show detailed workload informationDotNet.Workload().Version()- Show workload set versionDotNet.Workload().Install(workloadIds...)- Install workloads with comprehensive optionsDotNet.Workload().List()- List installed workloads with verbosity controlDotNet.Workload().Search(searchString?)- Search available workloadsDotNet.Workload().Uninstall(workloadIds...)- Remove workloadsDotNet.Workload().Update()- Update workloads with extensive configuration optionsDotNet.Workload().Repair()- Repair workload installationsDotNet.Workload().Clean()- Clean orphaned workloads with--alloptionDotNet.Workload().Restore(project?)- Restore workloads for projects/solutionsDotNet.Workload().Config()- Configure workload update modes (workload-set/manifests)
π― Key Highlights
- Complete API Coverage: All Microsoft documentation options implemented
- 28 Comprehensive Tests: 100% test coverage for all workload functionality
- Fluent Design: Consistent builder pattern with method chaining
- Graceful Error Handling: Empty results instead of exceptions
- Environment Support: Working directory and environment variable configuration
- Production Ready: All 26 test suites pass with 100% success rate
π Test Results
- Total Test Suites: 26
- Passed: 26 β
- Failed: 0 β
- Success Rate: 100% π―
π οΈ Workload Management Examples
Installing Workloads
// Install MAUI workload
await DotNet.Workload()
.Install("maui")
.WithIncludePreview()
.WithSource("https://api.nuget.org/v3/index.json")
.ExecuteAsync();
// Install multiple workloads
await DotNet.Workload()
.Install("maui", "android", "ios")
.WithConfigFile("nuget.config")
.WithVersion("8.0.100")
.ExecuteAsync();Managing Workloads
// List installed workloads
var workloads = await DotNet.Workload()
.List()
.WithVerbosity("detailed")
.GetLinesAsync();
// Search for workloads
var searchResults = await DotNet.Workload()
.Search("maui")
.GetLinesAsync();
// Update all workloads
await DotNet.Workload()
.Update()
.WithIncludePreview()
.WithNoCache()
.ExecuteAsync();Maintenance Operations
// Repair workload installations
await DotNet.Workload()
.Repair()
.WithIgnoreFailedSources()
.WithVerbosity("detailed")
.ExecuteAsync();
// Clean orphaned workloads
await DotNet.Workload()
.Clean()
.WithAll()
.ExecuteAsync();
// Restore workloads for a project
await DotNet.Workload()
.Restore("MyApp.csproj")
.WithIncludePreview()
.ExecuteAsync();Configuration Management
// Configure workload update mode
await DotNet.Workload()
.Config()
.WithUpdateModeWorkloadSet()
.ExecuteAsync();
// Get workload information
var info = await DotNet.Workload()
.Info()
.GetStringAsync();π§ Complete Command Suite
TimeWarp.Cli now provides comprehensive .NET CLI coverage with 23 major commands:
Core Commands
- DotNet.Run() - Run applications
- DotNet.Build() - Build projects
- DotNet.Test() - Run tests
- DotNet.Clean() - Clean build artifacts
- DotNet.Restore() - Restore dependencies
Package Management
- DotNet.Pack() - Create packages
- DotNet.Publish() - Publish applications
- DotNet.AddPackage() - Add package references
- DotNet.RemovePackage() - Remove package references
- DotNet.ListPackages() - List package references
Project Management
- DotNet.New() - Create new projects/items
- DotNet.PackageSearch() - Search for packages
- DotNet.Reference() - Manage project references
- DotNet.Sln() - Solution file management
Advanced Features
- DotNet.NuGet() - Complete NuGet management
- DotNet.Tool() - Tool management
- DotNet.DevCerts() - Certificate management
- DotNet.UserSecrets() - User secrets management
- DotNet.Watch() - File watching
- DotNet.Workload() - Complete workload management β¨ NEW
π What This Means
With the addition of comprehensive workload management, TimeWarp.Cli now provides complete .NET CLI coverage for:
- Development Workflows: Build, test, run, watch, clean
- Package Management: Add, remove, list, search, publish packages
- Project Management: Create, reference, solution management
- DevOps Integration: Certificate management, secrets, tools
- Modern .NET Development: Full workload support for MAUI, Blazor, and more
Perfect for C# scripting, automation, CI/CD pipelines, and modern .NET development workflows!
π Installation
dotnet add package TimeWarp.Cli --version 0.6.0-beta6Ready for production use with comprehensive error handling and 100% test coverage!