{"id":36310,"date":"2026-02-19T02:37:48","date_gmt":"2026-02-19T02:37:48","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=36310"},"modified":"2026-02-19T02:37:48","modified_gmt":"2026-02-19T02:37:48","slug":"microsoft-c-msvc-build-tools-v14-51-preview-released-how-to-opt-in","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/microsoft-c-msvc-build-tools-v14-51-preview-released-how-to-opt-in\/","title":{"rendered":"Microsoft C++ (MSVC) Build Tools v14.51 Preview Released: How to Opt In"},"content":{"rendered":"<p>Today we are releasing the first preview of the Microsoft C++ (MSVC) Build Tools version 14.51. This update, shipping in the latest Visual Studio 2026 version 18.4 Insiders release, introduces many C++23 conformance changes, bug fixes, and runtime performance improvements. Check out the <a href=\"https:\/\/learn.microsoft.com\/visualstudio\/releases\/2026\/release-notes-insiders\">release notes<\/a> for an in-progress list of what\u2019s new. Conformance improvements and bug fixes will be detailed in an upcoming blog post and Insiders release notes in the near future.<\/p>\n<p>We plan to ship more frequent, incremental MSVC Build Tools previews, just as we are shipping more frequent IDE updates. As a result, we have adjusted the process for enabling and using MSVC previews, and this post describes the new process.<\/p>\n<p>We encourage you to explore MSVC previews to adapt to breaking changes and report issues early. MSVC previews do not receive servicing patches and thus should not be used in production environments.<\/p>\n<h2>How to opt in<\/h2>\n<p>Visual Studio 2026 has changed the process for opting in to MSVC Build Tools previews. Most Visual Studio updates will include fresh MSVC previews, bringing compiler changes to you far faster than ever before. These updates will occur more frequently in the Insiders channel. Soon, you will also be able to install MSVC previews from the Stable channel, though these will be less recent than the builds available in Insiders.<\/p>\n<h3>Installing MSVC previews<\/h3>\n<p>To install MSVC v14.51 Preview, you must select one or both of these components in the Visual Studio installer depending on what architectures you are targeting for your builds:<\/p>\n<ol>\n<li>MSVC Build Tools for x64\/x86 (Preview)<\/li>\n<li>MSVC Build Tools for ARM64\/ARM64EC (Preview)<\/li>\n<\/ol>\n<p>You can install these from the Workloads tab under <em>Desktop development with C++<\/em> or from the <em>Individual components<\/em> tab.<\/p>\n<p><strong>How to install MSVC v14.51 Preview from the C++ desktop workload<\/strong><\/p>\n<p><img decoding=\"async\" width=\"1846\" height=\"987\" class=\"wp-image-36311\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1.webp\" alt=\"Desktop development with C++ workload includes checkboxes for installing MSVC previews on the right side pane.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1.webp 1846w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1-300x160.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1-1024x548.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1-768x411.webp 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-1-1536x821.webp 1536w\" sizes=\"(max-width: 1846px) 100vw, 1846px\" \/><\/p>\n<p><strong>MSVC v14.51 components under \u201cIndividual components\u201d<\/strong><\/p>\n<p><img decoding=\"async\" width=\"906\" height=\"688\" class=\"wp-image-36312\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-2.webp\" alt=\"The Individual components page in the Visual Studio installer includes preview MSVC compilers as well as support libraries and frameworks.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-2.webp 906w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-2-300x228.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-2-768x583.webp 768w\" sizes=\"(max-width: 906px) 100vw, 906px\" \/><\/p>\n<p>An easy way to find the relevant components under <em>Individual components<\/em>\u00a0is to search for \u201cpreview\u201d. Here you will also find support libraries and frameworks like MFC, ATL, C++\/CLI, and Spectre-mitigated libraries compatible with this MSVC preview.<\/p>\n<p>The components are the same as stable MSVC releases, except they are marked with \u201c(MSVC Preview)\u201d rather than \u201c(Latest)\u201d or a specific version number. Whenever you update Visual Studio, your MSVC preview will also be updated to the latest available build in that installer channel. Preview MSVC builds are not designed with version pinning in mind and do not receive servicing updates, though you can always download fresh builds as you update the IDE.<\/p>\n<p>If you only want to build in the command line, you can also install MSVC v14.51 Preview using the <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/#build-tools-for-visual-studio-2026\">Build Tools for Visual Studio 2026<\/a>, by selecting the same checkboxes.<\/p>\n<h3>Configuring Command Prompts<\/h3>\n<p>You can configure MSVC Preview command-line builds by navigating to this path and running the appropriate vcvars for your desired environment:<\/p>\n<p><strong>cmd.exe example for x64 builds:<\/strong><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">cd \"C:\\Program Files\\Microsoft Visual Studio\\18\\Insiders\\VC\\Auxiliary\\Build\"\r\n.\\vcvars64.bat -vcvars_ver=Preview<\/code><\/pre>\n<p><img decoding=\"async\" width=\"1053\" height=\"468\" class=\"wp-image-36313\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/a-command-prompt-window-is-displayed-indicating-t.webp\" alt=\"A command prompt window is displayed, indicating the initialization of a Visual Studio 2026 developer command prompt with the x64 environment.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/a-command-prompt-window-is-displayed-indicating-t.webp 1053w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/a-command-prompt-window-is-displayed-indicating-t-300x133.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/a-command-prompt-window-is-displayed-indicating-t-1024x455.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/a-command-prompt-window-is-displayed-indicating-t-768x341.webp 768w\" sizes=\"(max-width: 1053px) 100vw, 1053px\" \/><\/p>\n<h3>Configuring MSBuild Projects<\/h3>\n<p>For MSBuild projects, you must enable MSVC preview builds in the project system by setting the new <em>Use MSVC Build Tools Preview<\/em> property to \u201cYes\u201d and making sure the <em>MSVC Build Tools Version<\/em> property is set to \u201cLatest supported\u201d. If <em>MSVC Build Tools Version<\/em> is set to something other than \u201cLatest supported\u201d, that MSVC version will be used for builds instead. If you wish to switch back to a stable MSVC build, you should set <em>Use MSVC Build Tools Preview<\/em> to \u201cNo\u201d.<\/p>\n<p><strong>Instructions &#8211; Enabling MSVC previews in MSBuild projects<\/strong><\/p>\n<p>First, right-click the project you want to modify in <em>Solution Explorer<\/em>, select <em>Properties<\/em>.<\/p>\n<p>Next, make sure your <em>Configuration<\/em> and <em>Platform<\/em> at the top are set to what you want to modify.<\/p>\n<p>Under the <em>General<\/em> tab (open by default), set <em>Use MSVC Build Tools Preview<\/em> to \u201cYes\u201d.<\/p>\n<p><img decoding=\"async\" width=\"793\" height=\"535\" class=\"wp-image-36314\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-4.webp\" alt=\"To enable MSVC previews in the MSBuild project system, set MSVC Build Tools version to Latest supported and Use MSVC Build Tools Preview to Yes.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-4.webp 793w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-4-300x202.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/02\/word-image-36310-4-768x518.webp 768w\" sizes=\"(max-width: 793px) 100vw, 793px\" \/><\/p>\n<p>Make sure the <em>MSVC Build Tools Version<\/em> property is set to \u201cLatest supported\u201d, or else your project will build with the version specified there instead.<\/p>\n<p>Lastly, run a build to make sure it works. Your project will now build using the latest preview tools.<\/p>\n<p>Note: For command-line builds, you can also set the new property by running:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">msbuild &lt;project_or_solution_file&gt; \/p:MSVCPreviewEnabled=true<\/code><\/pre>\n<h3>Configuring CMake Projects<\/h3>\n<p>For CMake projects, you should specify the MSVC version in a CMakePresets.json file under the toolset property. The same process applies regardless of what version of MSVC you want to use (and whether it\u2019s a Preview or not).<\/p>\n<p><strong>Instructions &#8211; Enabling MSVC previews in CMake projects<\/strong><\/p>\n<p>First, open your CMake project in Visual Studio.\u00a0Ensure your workspace has a <em>CMakePresets.json<\/em> file in the root directory. See <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build\/cmake-presets-vs?view=msvc-170\">Configure and build with CMake Presets | Microsoft Learn<\/a> if you need help configuring a CMakePresets file.<\/p>\n<p>Then, add a base preset under <em>configurePresets<\/em> that specifies MSVC v14.51:<\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\r\n\u00a0 \u00a0 \"name\": \"windows-msvc-v1451-base\",\r\n\u00a0 \u00a0 \"description\": \"Base preset for MSVC v14.51\",\r\n\u00a0 \u00a0 \"hidden\": true,\r\n\u00a0 \u00a0 \"inherits\": \"windows-base\",\r\n\u00a0 \u00a0 \"toolset\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"v145,host=x64,version=14.51\"\r\n\u00a0 \u00a0 }\r\n}<\/code><\/pre>\n<p>Next, add more specific presets for each individual architecture, e.g.:<\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\r\n\u00a0 \u00a0 \"name\": \"x64-debug-msvc-v1451-preview\",\r\n\u00a0 \u00a0 \"displayName\": \"x64 Debug (MSVC v14.51 Preview)\",\r\n\u00a0 \u00a0 \"inherits\": \"windows-msvc-v1451-base\",\r\n\u00a0 \u00a0 \"architecture\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"x64\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"strategy\": \"external\"\r\n\u00a0 \u00a0 },\r\n\u00a0 \u00a0 \"cacheVariables\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"CMAKE_BUILD_TYPE\": \"Debug\"\r\n\u00a0 \u00a0 }\r\n}<\/code><\/pre>\n<p>Next, slect the new build configuration from the list of targets beside the Play button at the top of the IDE.<\/p>\n<p>Lastly, run a build to make sure it works. You can create additional presets the same way for other MSVC versions to easily swap between them.<\/p>\n<h2>Known issues<\/h2>\n<p>There are several known issues that will be fixed in a future MSVC Build Tools Preview and\/or Visual Studio Insiders release.<\/p>\n<h3>CMake targets using Visual Studio generator<\/h3>\n<p>There is a bug configuring CMake targets using the Visual Studio (MSBuild) generator. A workaround is described below.<\/p>\n<p>First, open <em>Developer Command Prompt for VS Insiders<\/em> (or the prompt for the version of Visual Studio you are using) as an administrator.<\/p>\n<p>Then, run the following commands, which create a new folder and copy a file from another location to it:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">pushd %VCINSTALLDIR%\\Auxiliary\\Build\r\nmkdir 14.51\r\ncopy .\\v145\\Microsoft.VCToolsVersion.VC.14.51.props\u00a0.\\14.51\\Microsoft.VCToolsVersion.14.51.props\r\ncopy .\\v145\\Microsoft.VCToolsVersion.VC.14.51.txt .\\14.51\\Microsoft.VCToolsVersion.14.51.txt<\/code><\/pre>\n<p>Lastly, run a build to make sure it works.<\/p>\n<h3>Command-line builds using PowerShell<\/h3>\n<p>Command line builds in PowerShell (including via Launch-VsDevShell.ps1) are not yet configured for the preview.<\/p>\n<h3>C++ CMake tools for Windows dependency on latest stable MSVC<\/h3>\n<p>If you are using the CMake tools in Visual Studio, their installer component still has a dependency on the latest stable version of MSVC. Therefore you will need to install both latest stable and latest preview MSVC Build Tools until we correct this dependency relationship.<\/p>\n<h2>Try out MSVC v14.51 Preview in Visual Studio 2026!<\/h2>\n<p>We encourage you to try out <a href=\"https:\/\/visualstudio.microsoft.com\/insiders\">Visual Studio 2026 version 18.4 on the Insiders Channel<\/a>, along with MSVC version 14.51 Preview. For MSVC, your feedback can help us address any bugs and improve build and runtime performance. Submit feedback using the Help &gt; Send Feedback menu from the IDE, or by navigating directly to <a href=\"https:\/\/developercommunity.visualstudio.com\/index.html\">Visual Studio Developer Community<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we are releasing the first preview of the Microsoft C++ (MSVC) Build Tools version 14.51. This update, shipping in the latest Visual Studio 2026 version 18.4 Insiders release, introduces many C++23 conformance changes, bug fixes, and runtime performance improvements. Check out the release notes for an in-progress list of what\u2019s new. Conformance improvements and [&hellip;]<\/p>\n","protected":false},"author":1063,"featured_media":35800,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3958],"tags":[282,185],"class_list":["post-36310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-visual-studio","tag-msvc","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Today we are releasing the first preview of the Microsoft C++ (MSVC) Build Tools version 14.51. This update, shipping in the latest Visual Studio 2026 version 18.4 Insiders release, introduces many C++23 conformance changes, bug fixes, and runtime performance improvements. Check out the release notes for an in-progress list of what\u2019s new. Conformance improvements and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/1063"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=36310"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36310\/revisions"}],"predecessor-version":[{"id":36321,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36310\/revisions\/36321"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35800"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=36310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=36310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=36310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}