Cake 7.0.0 brings build automation to .NET 11 and C# 15, drops .NET 8 and .NET 9 runners, and aligns all three runners on one DI container. Container publishing, on-demand tool installs and secret-free Azure login from GitHub Actions are new.
Key points
- Cake 7.0.0 targets net10.0 and net11.0 and adds C# 15 scripting; .NET 8 and .NET 9 can no longer run the build tool.
- Cake.Tool swapped Autofac for Microsoft.Extensions.DependencyInjection, exposing the ServiceProvider alias on ICakeContext in every runner.
- Shared dependencies now run once when multiple targets are passed; revert with UnifiedDependencyGraphForMultipleTargets=false in args or cake.config.
- Environment-defaulted switches such as Interactive and CreateManifestIfNeeded became bool?, so null keeps the CLI default and false is passed explicitly.
- DotNetPublish can build container images and push them to a registry, load them into Docker/Podman/WSL, or write a tarball.
- AzureLogin trades a GitHub Actions OIDC token for an Azure token, and AzurePrepareWorkloadIdentity writes the federated token file for DefaultAzureCredential.
Real-world use
- A GitHub Actions workflow that deploys to Azure with AzureLogin and OIDC instead of a stored client secret.
- A build invoked as --target=Test --target=Pack where the shared Build dependency should execute only once.
- A task that installs a tool such as GitVersion.Tool via InstallTool only when that task actually runs.
- Shipping the Cake.Sdk build itself as a container image so it runs identically in any CI environment.
This summary was generated by the agent from the original post on Cake Build Blog. The full text and all rights belong to its author and publisher. Go to original