Skip to content

v0.6.0-beta6: Complete .NET Workload Management

Choose a tag to compare

@StevenTCramer StevenTCramer released this 11 Jul 13:41
· 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 information
  • DotNet.Workload().Version() - Show workload set version
  • DotNet.Workload().Install(workloadIds...) - Install workloads with comprehensive options
  • DotNet.Workload().List() - List installed workloads with verbosity control
  • DotNet.Workload().Search(searchString?) - Search available workloads
  • DotNet.Workload().Uninstall(workloadIds...) - Remove workloads
  • DotNet.Workload().Update() - Update workloads with extensive configuration options
  • DotNet.Workload().Repair() - Repair workload installations
  • DotNet.Workload().Clean() - Clean orphaned workloads with --all option
  • DotNet.Workload().Restore(project?) - Restore workloads for projects/solutions
  • DotNet.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-beta6

Ready for production use with comprehensive error handling and 100% test coverage!