Microsoft.NET.Build.Containers 7.0.402

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.NET.Build.Containers --version 7.0.402
                    
NuGet\Install-Package Microsoft.NET.Build.Containers -Version 7.0.402
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.NET.Build.Containers" Version="7.0.402" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.NET.Build.Containers" Version="7.0.402" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.NET.Build.Containers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.NET.Build.Containers --version 7.0.402
                    
#r "nuget: Microsoft.NET.Build.Containers, 7.0.402"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.NET.Build.Containers&version=7.0.402
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.NET.Build.Containers&version=7.0.402
                    
Install as a Cake Tool

.NET SDK Containers

This package lets you build container images from your projects with a single command.

Getting Started

To build a container from the SDK, add this package and run the publish command, specifying the DefaultContainer PublishProfile. You can learn more about Publish Profiles in the documentation.

>dotnet add package Microsoft.NET.Build.Containers
>dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer
...
Pushed container '<your app name>:<your app version>' to registry 'docker://'
...

Out of the box, this package will infer a number of properties about the generated container image, including which base image to use, which version of that image to use, and where to push the generated image. You have control over all of these properties, however. You can read more about these customizations here.

Note: This package only supports Web projects (those that use the Microsoft.NET.Sdk.Web SDK) in this version.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net7.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Microsoft.NET.Build.Containers:

Package Downloads
UtilityBelt.Server

UBNet server.

IPP.PORTIC.SAFHE.Library

This software regards the project number 070200, SAFHE - Safe Health Elderly Monitoring, an EU funded project, and constitutes the technical contribution of the PORTIC-IPP together with the ESS-IPP (specifically both entities PORTIC - Porto Research, Technology and Innovation Center, and ESS - Escola Superior de Saúde, both sub-entities from the institution IPP - Instituto Politécnico do Porto) to the project.! The url of the project is: https://www.portic.ipp.pt/project.html

SotracomEntities

Package Description

MultiChannelReportLog-ex-1

Package Description

SotracomEntities_2024

Package Description

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Microsoft.NET.Build.Containers:

Repository Stars
microsoft/dotnet-podcasts
.NET reference application shown at .NET Conf featuring ASP.NET Core, Blazor, .NET MAUI, Microservices, Orleans, Playwright, and more!
asynkron/protoactor-dotnet
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
mehdihadeli/food-delivery-microservices
🍔 A practical and imaginary food delivery microservices, built with .Net 9, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
rstropek/Samples
richlander/container-workshop
Documents fundamental .NET Container workflows
Version Downloads Last Updated
10.0.100-preview.5.25277.114 100 6/6/2025
10.0.100-preview.4.25258.110 231 5/12/2025
10.0.100-preview.3.25201.16 211 4/10/2025
10.0.100-preview.2.25164.34 174 3/18/2025
10.0.100-preview.1.25120.13 141 2/25/2025
9.0.301 1,253 6/10/2025
9.0.300 2,212 5/13/2025
9.0.205 332 6/10/2025
9.0.204 305 5/13/2025
9.0.203 4,435 4/8/2025
9.0.202 2,108 3/18/2025
9.0.201 2,892 3/11/2025
9.0.200 3,956 2/11/2025
9.0.200-preview.0.24575.35 567 12/10/2024
9.0.107 332 6/10/2025
9.0.106 302 5/13/2025
9.0.105 342 4/8/2025
9.0.104 403 3/11/2025
9.0.103 534 2/11/2025
9.0.102 9,777 1/14/2025
9.0.101 4,883 12/3/2024
9.0.100 10,864 11/12/2024
9.0.100-rc.2.24474.11 415 10/8/2024
9.0.100-rc.1.24452.12 234 9/10/2024
9.0.100-preview.7.24407.12 260 8/13/2024
9.0.100-preview.6.24328.19 225 7/9/2024
9.0.100-preview.5.24307.3 462 6/11/2024
9.0.100-preview.4.24267.43 263 5/21/2024
9.0.100-preview.3.24204.14 313 4/11/2024
9.0.100-preview.2.24157.36 329 3/12/2024
9.0.100-preview.1.24101.1 1,185 2/13/2024
8.0.411 428 6/10/2025
8.0.410 407 5/22/2025
8.0.409 356 5/13/2025
8.0.408 724 4/8/2025
8.0.407 1,998 3/11/2025
8.0.406 957 2/11/2025
8.0.405 2,578 1/14/2025
8.0.404 6,503 11/12/2024
8.0.403 28,646 10/8/2024
8.0.402 4,312 9/24/2024
8.0.401 30,178 8/15/2024
8.0.400 2,907 8/13/2024
8.0.314 320 6/10/2025
8.0.313 202 5/22/2025
8.0.312 290 5/13/2025
8.0.311 314 4/8/2025
8.0.310 328 3/11/2025
8.0.309 412 2/11/2025
8.0.308 394 1/14/2025
8.0.307 456 11/12/2024
8.0.306 498 10/8/2024
8.0.304 498 8/13/2024
8.0.303 13,654 7/9/2024
8.0.302 15,840 6/11/2024
8.0.301 3,781 5/28/2024
8.0.300 14,159 5/14/2024
8.0.206 1,063 5/28/2024
8.0.205 556 5/14/2024
8.0.204 39,442 4/9/2024
8.0.202 19,349 3/12/2024
8.0.200 37,562 2/13/2024
8.0.117 337 6/10/2025
8.0.116 298 5/13/2025
8.0.115 504 4/8/2025
8.0.114 343 3/11/2025
8.0.113 402 2/11/2025
8.0.112 416 1/14/2025
8.0.111 478 11/12/2024
8.0.110 649 10/8/2024
8.0.108 518 8/13/2024
8.0.107 542 7/9/2024
8.0.106 545 5/28/2024
8.0.105 518 5/14/2024
8.0.104 591 4/9/2024
8.0.103 621 3/12/2024
8.0.102 713 2/13/2024
8.0.101 44,077 1/9/2024
8.0.100 100,190 11/14/2023
8.0.100-rc.2.23480.5 2,211 10/10/2023
8.0.100-rc.1.23462.41 1,230 9/14/2023
8.0.100-rc.1.23455.21 667 9/12/2023
8.0.100-preview.7.23376.5 1,375 8/8/2023
8.0.100-preview.6.23330.7 1,249 7/11/2023
8.0.100-preview.5.23303.1 1,194 6/13/2023
8.0.100-preview.4.23260.11 1,179 5/16/2023
7.0.410 13,720 5/28/2024
7.0.409 1,432 5/14/2024
7.0.408 2,346 4/9/2024
7.0.407 2,600 3/12/2024
7.0.406 5,876 2/13/2024
7.0.405 24,630 1/9/2024
7.0.404 23,535 11/14/2023
7.0.403 37,231 10/24/2023
7.0.402 18,928 10/10/2023
7.0.401 56,139 9/12/2023
7.0.400 138,108 8/8/2023
7.0.317 335 5/28/2024
7.0.316 347 5/14/2024
7.0.315 465 4/9/2024
7.0.314 445 3/12/2024
7.0.313 479 2/13/2024
7.0.312 452 1/9/2024
7.0.311 890 11/14/2023
7.0.310 545 10/24/2023
7.0.309 587 10/10/2023
7.0.308 624 9/12/2023
7.0.307 8,405 8/8/2023
7.0.306 47,885 7/11/2023 7.0.306 has at least one vulnerability with high severity.
7.0.305 34,402 6/22/2023 7.0.305 has at least one vulnerability with high severity.
7.0.304 16,371 6/13/2023 7.0.304 has at least one vulnerability with high severity.
7.0.302 73,940 5/16/2023 7.0.302 has at least one vulnerability with high severity.
0.4.0 204,066 3/22/2023 0.4.0 has at least one vulnerability with high severity.
0.3.2 186,236 1/20/2023 0.3.2 has at least one vulnerability with high severity.
0.2.7 157,935 10/27/2022 0.2.7 has at least one vulnerability with high severity.
0.1.8 15,241 8/25/2022 0.1.8 has at least one vulnerability with high severity.

# Microsoft.NET.Build.Containers 7.0.400

This version brings the following new features and enhancements:

* For WebSdk projects (and any project that includes the `Microsoft.NET.Publish.Sdk` SDK), the container tools are included and available by default! This means that you no longer need to set the `EnableSdkContainerSupport` property in your project files or include the `Microsoft.NET.Build.Containers` package in your projects in order to publish containers. For project types that do not include the Publish SDK (like console or webjob projects), you still must add the `Microsoft.NET.Build.Containers` NuGet package as a PackageReference to your project, and publish using the `/t:PublishContainer` target explicitly.
* When targeting `net8.0` TargetFrameworks during preview release time frames, the inferred preview image will be more correct. Previously it could get out of sync with the actual image tagging scheme used by the dotnet-docker team.
* The layer upload process was massively refactored. This resulted in more performance, more reliability, and better support for more kinds of registries. As part of this, we now try the following upload algorithm for a layer:
   * Try to upload the whole layer in one compressed payload
   * If that fails, try to upload in chunks
   * When uploading chunks, we look for indicators from the registry to choose the chunk size

   In addition, we fixed some protocol bugs that blocked usage with registries like Harbor.
* Several environment variables were added to allow more explicit control over the layer upload process:
   * SDK_CONTAINER_REGISTRY_PARALLEL_UPLOAD
       * determines if layers of the generated image can be uploaded in parallel or in series.
       * defaults to `true` for all registries except AWS ECR
   * SDK_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD
       * if set to `true`, we will always try to upload layers in chunks instead of all in one upload.
       * defaults to `false`.
   * SDK_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES
       * allows for explicit control over the size of the chunks uploaded when using chunked uploads.
       * note that by default we prefer atomic uploads, so setting this might not have any impact if your registry supports atomic uploads.
       * does not have a default, but the default chunk size is 64Kb.
* Naming is important, so we've renamed the `ContainerImageName` property to `ContainerRepository`. Repository is the name used for the user-facing image (for example `dotnet/runtime`), and it's used this way in most container documentation, so we've adopted that naming to make it easier to keep the terminology aligned. We still handle `ContainerImageName`, but we now will emit a validation warning during the publish if that property is used.
* The default OS for inferred containers is now `linux` instead of `windows`. Windows container usage is much less than Linux container usage, and we should default to the most likely configuration to make the onbaording story for the tooling easier. You can always control this explicitly by publishing for a specific `RuntimeIdentifier` (via the `-r` parameter or the `RuntimeIdentifier` MSBuild property) or setting the `ContainerRuntimeIdentifier` to a valid runtime identifier value.
* We added read support for OCI Container manifests. Practically speaking this means that you can now use base images from registries like Quay.io, Artifactory, and Docker Hub that typically send image manifests in this format instead of the older Docker-based format.