MSBuild Versions and Release History
|
This section documents MSBuild 18.9, the .NET SDK 10.0.402 (with its This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The C# Reference bibliography lists the reference material consulted while preparing these pages. |
MSBuild has its own version number, separate from Visual Studio and from the .NET SDK, and each Visual Studio release and each SDK feature band carries a specific MSBuild. Knowing which one runs explains most "works in Visual Studio, fails in CI" differences. This page shows how to find the version, maps it to Visual Studio and the SDK, and collects the release history cited throughout this section. The baseline is MSBuild 18.9.15 in .NET SDK 10.0.402.
Finding the version in use
dotnet --version
dotnet msbuild -version
dotnet msbuild cw.proj -getProperty:MSBuildVersion -getProperty:MSBuildRuntimeType -getProperty:MSBuildAssemblyVersion
10.0.402
18.9.15.50611
{
"Properties": {
"MSBuildVersion": "18.9.15",
"MSBuildRuntimeType": "Core",
"MSBuildAssemblyVersion": "18.0"
}
}
-
dotnet --versionis the SDK chosen for the current folder (afterglobal.json);dotnet msbuild -versionis the MSBuild inside that SDK. With 10.0.402 the two are 10.0.402 and 18.9.15. -
msbuild -versionin a Visual Studio Developer Command Prompt prints themsbuild.exeversion (18.11 with Visual Studio 2026 18.11) — a different MSBuild from the onedotnet buildruns on the same machine. -
$(MSBuildVersion)is the version inside a project;$(MSBuildRuntimeType)isCorefordotnetandFullformsbuild.exe. The assemblies themselves keep assembly version 15.1.0.0 for every release from 15 to 18 (The MSBuild API and MSBuild Locator).
Version mapping
The .NET SDK version’s hundreds digit is its feature band (10.0.1xx, 10.0.2xx, …); each band ships a newer MSBuild.
| MSBuild | Visual Studio | .NET SDK | Notes |
|---|---|---|---|
15.x |
2017 |
.NET Core 1.x—2.x |
SDK-style projects |
16.x |
2019 |
.NET Core 3.x, .NET 5 |
|
17.0 |
2022 17.0 |
.NET 6 (6.0.1xx) |
64-bit |
17.8 |
2022 17.8 |
.NET 8 (8.0.1xx) |
Terminal Logger opt-in |
17.12 |
2022 17.12 |
.NET 9 (9.0.1xx) |
Terminal Logger default, BuildCheck |
18.0 |
2026 18.0 |
.NET 10 (10.0.1xx) |
.NET task host |
18.9 |
— |
10.0.4xx (10.0.402) |
this section’s baseline |
18.11 |
2026 18.11 |
— |
latest stable (GitHub tag v18.11.0) |
18.12 (preview) |
— |
.NET 11 RC 2 |
preview |
The release tags on GitHub jump from v18.0.2 to v18.3.3: there are no 18.1 or 18.2 tags. The tags were listed
with git ls-remote --tags https://github.com/dotnet/msbuild on 2026-10-23.
Release history
The MSBuild documentation has no "what’s new" page after 17.0. Later rows cite the .NET SDK what’s-new pages and the GitHub releases; rows marked re-verify were not checked against a release note.
| Release | Change | Cited from |
|---|---|---|
15.0 (Visual Studio 2017) |
SDK-style projects and the |
|
15.8 |
|
|
16.x (Visual Studio 2019) |
static graph builds ( |
|
17.0 (Visual Studio 2022) |
64-bit |
|
17.8 (.NET 8) |
Terminal Logger opt-in ( |
|
17.12 (.NET 9) |
Terminal Logger on by default for |
|
17.13 (9.0.2xx) |
a |
|
18.0 (Visual Studio 2026, .NET 10) |
the .NET task host: tasks built for .NET run in |
|
18.6 |
|
|
18.9 (SDK 10.0.4xx) |
this section’s baseline; change wave 18.9 (Mark-of-the-Web ResX blocking, MSB3821) |
|
.NET 11 (preview) |
MSBuild Server on by default ( |
Guarding logic by version
Shared .props/.targets files that must run on several MSBuild versions test $(MSBuildVersion) with the version
functions, never with string or < comparisons
(Conditions):
<Project>
<Target Name="Show">
<Message Importance="high" Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(MSBuildVersion)', '18.6'))"
Text="MSBuild $(MSBuildVersion): -mt is available" />
<Message Importance="high" Condition="'$(MSBuildRuntimeType)' == 'Full'"
Text="Running in msbuild.exe (.NET Framework)" />
</Target>
</Project>
MSBuild 18.9.15: -mt is available
A package that needs a minimum MSBuild can also fail early with an Error task under the opposite condition, which is
clearer than the error the missing feature would cause.
Source: MSBuild version comparison functions.
Common mistakes
-
Assuming Visual Studio and
dotnet builduse the same MSBuild — 18.11 versus 18.9 on a machine with Visual Studio 2026 18.11 and SDK 10.0.402. -
Comparing
$(MSBuildVersion)with<— useVersionGreaterThanOrEquals. -
Reading the assembly version (15.1.0.0) as the product version.
-
Looking for a "what’s new in MSBuild 18" page — use the GitHub releases and the SDK what’s-new pages.