From 36738035d38d4d2ab474a3f4681366fa341a6f6c Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Wed, 29 Oct 2025 02:24:11 -0700 Subject: [PATCH 01/18] Branding updates (#6129) * Updated MSVC branding for /docs/assembler * Reverted unnecessary branding change in /assembler/inline/inline-assembler-overview * All remaining MSVC branding changes except /porting folder; this will be covered by a separate PR to update those docs * minor updates --------- Co-authored-by: Augustin Popa --- .../arm-assembler-command-line-reference.md | 2 +- docs/assembler/inline/asm.md | 2 +- .../instruction-set-for-inline-assembly.md | 2 +- .../inline/intel-s-mmx-instruction-set.md | 2 +- docs/build/arm64-windows-abi-conventions.md | 2 +- docs/build/arm64ec-windows-abi-conventions.md | 4 +- ...pplications-and-side-by-side-assemblies.md | 4 +- docs/build/building-on-the-command-line.md | 12 +++--- docs/build/cmake-presets-vs.md | 6 +-- docs/build/cmake-projects-in-visual-studio.md | 2 +- docs/build/cmakesettings-reference.md | 2 +- ...mmon-visual-cpp-64-bit-migration-issues.md | 10 ++--- .../common-visual-cpp-arm-migration-issues.md | 10 ++--- docs/build/compare-inclusion-methods.md | 2 +- ...pplications-and-side-by-side-assemblies.md | 4 +- ...figuring-programs-for-64-bit-visual-cpp.md | 6 +-- ...-programs-for-arm-processors-visual-cpp.md | 2 +- .../creating-precompiled-header-files.md | 2 +- ...termining-which-exporting-method-to-use.md | 2 +- docs/build/dlls-in-visual-cpp.md | 2 +- docs/build/exception-handling-x64.md | 2 +- .../exporting-from-a-dll-using-def-files.md | 2 +- ...-visual-cpp-toolset-on-the-command-line.md | 2 +- ...e-target-framework-and-platform-toolset.md | 4 +- docs/build/importing-using-def-files.md | 2 +- docs/build/msbuild-visual-cpp.md | 2 +- docs/build/overview-of-arm-abi-conventions.md | 4 +- docs/build/projects-and-build-systems-cpp.md | 8 ++-- docs/build/reference/c-cpp-prop-page.md | 2 +- docs/build/reference/fsanitize.md | 2 +- .../general-property-page-project.md | 2 +- docs/build/reference/linking.md | 4 +- .../microsoft-extensions-to-c-and-cpp.md | 2 +- .../reference/msbuild-visual-cpp-overview.md | 2 +- .../build/reference/vcxproj-file-structure.md | 4 +- .../reference/visual-cpp-project-types.md | 2 +- .../regular-dlls-statically-linked-to-mfc.md | 2 +- docs/build/run-time-library-behavior.md | 2 +- docs/build/stack-usage.md | 2 +- docs/build/toc.yml | 2 +- ...pplications-and-side-by-side-assemblies.md | 4 +- ...ing-custom-build-steps-and-build-events.md | 2 +- ...-manifest-generation-for-c-cpp-programs.md | 4 +- docs/build/vscpp-step-2-build.md | 2 +- ...compile-a-c-program-on-the-command-line.md | 2 +- ...g-a-cpp-cli-program-on-the-command-line.md | 6 +-- ...-native-cpp-program-on-the-command-line.md | 18 ++++----- ...ng-and-using-a-dynamic-link-library-cpp.md | 2 +- docs/build/walkthrough-header-units.md | 4 +- .../walkthrough-import-stl-header-units.md | 2 +- ...-msbuild-to-create-a-visual-cpp-project.md | 8 ++-- ...oating-point-numbers-may-lose-precision.md | 2 +- docs/build/working-with-project-properties.md | 2 +- ...cloud-and-web-programming-in-visual-cpp.md | 6 +-- .../build-reliable-secure-programs.md | 16 ++++---- .../code-analysis-for-c-cpp-overview.md | 2 +- .../using-the-cpp-core-guidelines-checkers.md | 2 +- ...wnload-and-install-the-embedded-tooling.md | 2 +- docs/get-started/toc.yml | 2 +- docs/get-started/tutorial-console-cpp.md | 2 +- ...-studio-ide-for-cpp-desktop-development.md | 4 +- docs/ide/writing-and-refactoring-code-cpp.md | 2 +- docs/intrinsics/arm-intrinsics.md | 2 +- docs/intrinsics/arm64-intrinsics.md | 2 +- docs/intrinsics/compiler-intrinsics.md | 2 +- docs/overview/compiler-versions.md | 38 +++++++++++-------- .../cpp-conformance-improvements-2019.md | 2 +- ...t-a-problem-with-the-visual-cpp-toolset.md | 6 +-- .../supported-platforms-visual-cpp.md | 10 ++--- docs/overview/toc.yml | 2 +- docs/overview/visual-cpp-in-visual-studio.md | 6 +-- .../visual-cpp-language-conformance.md | 4 +- ...-and-features-in-visual-studio-editions.md | 2 +- docs/sanitizers/asan-building.md | 1 - docs/sanitizers/asan-continue-on-error.md | 16 ++++---- docs/sanitizers/asan-flags.md | 2 +- docs/sanitizers/asan-known-issues.md | 2 +- docs/sanitizers/asan-runtime.md | 4 +- docs/sanitizers/asan.md | 4 +- .../error-stack-use-after-return.md | 4 +- .../security-best-practices-for-cpp.md | 2 +- ...-deployment-for-visual-cpp-applications.md | 12 +++--- ...-native-desktop-applications-visual-cpp.md | 18 ++++----- ...-using-the-vcpp-redistributable-package.md | 4 +- docs/windows/deployment-concepts.md | 6 +-- docs/windows/deployment-in-visual-cpp.md | 20 +++++----- docs/windows/toc.yml | 14 +++---- ...ependencies-of-a-visual-cpp-application.md | 10 ++--- ...pp-application-by-using-a-setup-project.md | 14 +++---- ...lication-to-an-application-local-folder.md | 18 ++++----- 90 files changed, 231 insertions(+), 226 deletions(-) diff --git a/docs/assembler/arm/arm-assembler-command-line-reference.md b/docs/assembler/arm/arm-assembler-command-line-reference.md index 6c79ceaf152..a686553e861 100644 --- a/docs/assembler/arm/arm-assembler-command-line-reference.md +++ b/docs/assembler/arm/arm-assembler-command-line-reference.md @@ -5,7 +5,7 @@ ms.date: 05/09/2022 --- # ARM Assembler command-line reference -The Microsoft ARM assemblers, **armasm** and **armasm64**, support several command-line options. By default, **armasm** assembles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The **armasm64** assembler creates COFF object code for ARM64 and ARM64EC targets. The linker can link COFF code objects produced by both the ARM assembler and the C/C++ compiler. It can link either together with object libraries created by the librarian. +The Microsoft ARM assemblers, **armasm** and **armasm64**, support several command-line options. By default, **armasm** assembles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The **armasm64** assembler creates COFF object code for ARM64 and ARM64EC targets. The linker can link COFF code objects produced by both the ARM assembler and the MSVC compiler. It can link either together with object libraries created by the librarian. ## Syntax diff --git a/docs/assembler/inline/asm.md b/docs/assembler/inline/asm.md index a14c0854693..78787c9492b 100644 --- a/docs/assembler/inline/asm.md +++ b/docs/assembler/inline/asm.md @@ -13,7 +13,7 @@ helpviewer_keywords: ["__asm keyword [C++], vs. asm blocks", "__asm keyword [C++ The **`__asm`** keyword invokes the inline assembler and can appear wherever a C or C++ statement is legal. It can't appear by itself. It must be followed by an assembly instruction, a group of instructions enclosed in braces, or, at minimum, an empty pair of braces. The term "**`__asm`** block" here refers to any instruction or group of instructions, whether or not in braces. > [!NOTE] -> Visual C++ support for the Standard C++ **`asm`** keyword is limited to the fact that the compiler will not generate an error on the keyword. However, an **`asm`** block will not generate any meaningful code. Use **`__asm`** instead of **`asm`**. +> MSVC support for the Standard C++ **`asm`** keyword is limited to the fact that the compiler will not generate an error on the keyword. However, an **`asm`** block will not generate any meaningful code. Use **`__asm`** instead of **`asm`**. ## Grammar diff --git a/docs/assembler/inline/instruction-set-for-inline-assembly.md b/docs/assembler/inline/instruction-set-for-inline-assembly.md index 13b356b5264..bbcdcbd635e 100644 --- a/docs/assembler/inline/instruction-set-for-inline-assembly.md +++ b/docs/assembler/inline/instruction-set-for-inline-assembly.md @@ -10,7 +10,7 @@ ms.assetid: a45b5b22-9b5f-4545-81ec-70eb8ea2ef9b **Microsoft Specific** -The Microsoft C++ compiler supports all opcodes through the Pentium 4 and AMD Athlon. Additional instructions supported by the target processor can be created with the [_emit Pseudoinstruction](../../assembler/inline/emit-pseudoinstruction.md). +The MSVC compiler supports all opcodes through the Pentium 4 and AMD Athlon. Additional instructions supported by the target processor can be created with the [_emit Pseudoinstruction](../../assembler/inline/emit-pseudoinstruction.md). **END Microsoft Specific** diff --git a/docs/assembler/inline/intel-s-mmx-instruction-set.md b/docs/assembler/inline/intel-s-mmx-instruction-set.md index eb492df28df..c66d08a1255 100644 --- a/docs/assembler/inline/intel-s-mmx-instruction-set.md +++ b/docs/assembler/inline/intel-s-mmx-instruction-set.md @@ -10,7 +10,7 @@ ms.assetid: 705deb2d-c3fd-4696-9e22-8bcf25866daf **Microsoft Specific** -The Microsoft C++ compiler allows you to use Intel's MMX (multimedia extension) instruction set in the inline assembler. The MMX instructions are also supported by the debugger disassembly. The compiler generates a warning message if the function contains MMX instructions but does not contain an EMMS instruction to empty the multimedia state. For more information, see the Intel Web site. +The MSVC compiler allows you to use Intel's MMX (multimedia extension) instruction set in the inline assembler. The MMX instructions are also supported by the debugger disassembly. The compiler generates a warning message if the function contains MMX instructions but does not contain an EMMS instruction to empty the multimedia state. For more information, see the Intel Web site. **END Microsoft Specific** diff --git a/docs/build/arm64-windows-abi-conventions.md b/docs/build/arm64-windows-abi-conventions.md index b5357e9bf3f..0d4f98ff387 100644 --- a/docs/build/arm64-windows-abi-conventions.md +++ b/docs/build/arm64-windows-abi-conventions.md @@ -260,5 +260,5 @@ The cycle counter here is a true cycle counter, not a wall clock. The counting f ## See also -[Common Visual C++ ARM Migration Issues](common-visual-cpp-arm-migration-issues.md)
+[Common Microsoft C++ ARM Migration Issues](common-visual-cpp-arm-migration-issues.md)
[ARM64 exception handling](arm64-exception-handling.md) diff --git a/docs/build/arm64ec-windows-abi-conventions.md b/docs/build/arm64ec-windows-abi-conventions.md index 9c78bc39f54..4cd9117c777 100644 --- a/docs/build/arm64ec-windows-abi-conventions.md +++ b/docs/build/arm64ec-windows-abi-conventions.md @@ -9,7 +9,7 @@ ARM64EC is an application binary interface (ABI) that enables ARM64 binaries to For more information on the x64 and ARM64 ABIs, see [Overview of x64 ABI conventions](x64-software-conventions.md) and [Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md). -ARM64EC doesn't solve memory model differences between x64 and ARM based architectures. For more information, see [Common Visual C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md). +ARM64EC doesn't solve memory model differences between x64 and ARM based architectures. For more information, see [Common Microsoft C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md). ## Definitions @@ -188,5 +188,5 @@ The ARM64EC toolchain currently doesn't support `__vectorcall`. The compiler emi ## See also [Understanding ARM64EC ABI and assembly code](/windows/arm/arm64ec-abi)\ -[Common Visual C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md)\ +[Common Microsoft C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md)\ [Decorated names](./reference/decorated-names.md) diff --git a/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md b/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md index 01183ef9898..8a247863e48 100644 --- a/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md +++ b/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md @@ -10,9 +10,9 @@ ms.topic: concept-article Visual Studio supports a deployment model for Windows client applications based on the idea of [isolated applications](/windows/win32/SbsCs/isolated-applications) and [side-by-side assemblies](/windows/win32/SbsCs/about-side-by-side-assemblies-). By default, Visual Studio builds all native C/C++ applications as isolated applications that use [manifests](/windows/win32/sbscs/manifests) to describe their dependencies on Visual C++ libraries. -Building C/C++ programs as isolated applications presents a range of advantages. For example, an isolated application is unaffected when other C/C++ applications install or uninstall Visual C++ libraries. Visual C++ libraries used by isolated applications may still be redistributed in either the application's local folder, or by installation to the native assembly cache (WinSxS); however, servicing of Visual C++ libraries for already deployed applications can be simplified by using a [publisher configuration file](/windows/win32/SbsCs/publisher-configuration). The isolated application deployment model makes it easier to ensure that C/C++ applications that are running on a specific computer use the most recent version of Visual C++ libraries, while still leaving open the possibility for system administrators and application authors to control explicit version binding of applications to their dependent DLLs. +Building C/C++ programs as isolated applications presents a range of advantages. For example, an isolated application is unaffected when other C/C++ applications install or uninstall Microsoft C++ libraries. Microsoft C++ libraries used by isolated applications may still be redistributed in either the application's local folder, or by installation to the native assembly cache (WinSxS); however, servicing of Microsoft C++ libraries for already deployed applications can be simplified by using a [publisher configuration file](/windows/win32/SbsCs/publisher-configuration). The isolated application deployment model makes it easier to ensure that C/C++ applications that are running on a specific computer use the most recent version of Microsoft C++ libraries, while still leaving open the possibility for system administrators and application authors to control explicit version binding of applications to their dependent DLLs. -This section discusses how you can build your C/C++ application as an isolated application and ensure that it binds to Visual C++ libraries using a manifest. The information in this section primarily applies to native, or unmanaged, C++ applications. For information about deploying native C++ applications built with Visual Studio, see [Redistributing Visual C++ Files](../windows/redistributing-visual-cpp-files.md). +This section discusses how you can build your C/C++ application as an isolated application and ensure that it binds to Microsoft C++ libraries using a manifest. The information in this section primarily applies to native, or unmanaged, C++ applications. For information about deploying native C++ applications built with Visual Studio, see [Redistributing Microsoft C++ Files](../windows/redistributing-visual-cpp-files.md). ## In This Section diff --git a/docs/build/building-on-the-command-line.md b/docs/build/building-on-the-command-line.md index 7b4a452f29b..1a2c2232451 100644 --- a/docs/build/building-on-the-command-line.md +++ b/docs/build/building-on-the-command-line.md @@ -1,15 +1,15 @@ --- -title: "Use the Microsoft C++ toolset from the command line" -description: "Use the Microsoft C++ (MSVC) compiler toolset from the command line outside of the Visual Studio IDE." +title: "Use the Microsoft C++ Build Tools from the command line" +description: "Use the Microsoft C++ (MSVC) Build Tools from the command line outside of the Visual Studio IDE." ms.custom: "conceptual" ms.date: 04/07/2022 helpviewer_keywords: ["command-line builds [C++]", "compiling source code [C++], command line", "builds [C++], command-line", "command line [C++], building from", "command line [C++], compilers"] ms.assetid: 7ca9daed-a003-4162-842d-908f79058365 ms.topic: how-to --- -# Use the Microsoft C++ toolset from the command line +# Use the Microsoft C++ Build Tools from the command line -You can build C and C++ applications on the command line by using tools that are included in Visual Studio. The Microsoft C++ (MSVC) compiler toolset is also downloadable as a standalone package. You don't need to install the Visual Studio IDE if you don't plan to use it. +You can build C and C++ applications on the command line by using tools that are included in Visual Studio. The Microsoft C++ (MSVC) Build Tools are also downloadable as a standalone package. You don't need to install the Visual Studio IDE if you don't plan to use it. > [!NOTE] > This article is about how to set up an environment to use the individual compilers, linkers, librarian, and other basic tools. The native project build system in Visual Studio, based on MSBuild, doesn't use the environment as described in this article. For more information on how to use MSBuild from the command line, see [MSBuild on the command line - C++](msbuild-visual-cpp.md). @@ -23,13 +23,13 @@ If you've installed Visual Studio and a C++ workload, you have all the command-l ::: moniker-end ::: moniker range="<=msvc-150" -If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). If you only want the command-line toolset, download the [Build Tools for Visual Studio 2017](https://my.visualstudio.com/Downloads?q=2017). When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the **Visual C++ build tools** workload. You can select optional libraries and toolsets to include under **Installation details**. To build code by using the Visual Studio 2015 toolset, select the optional MSVC v140 build tools. When you're satisfied with your selections, choose **Install**. +If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). If you only want the command-line toolset, download the [Build Tools for Visual Studio 2017](https://my.visualstudio.com/Downloads?q=2017). When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the **Desktop development with C++** workload. You can select optional libraries and toolsets to include under **Installation details**. To build code by using the Visual Studio 2015 toolset, select the optional MSVC v140 build tools. When you're satisfied with your selections, choose **Install**. ::: moniker-end ## How to use the command-line tools -When you choose one of the C++ workloads in the Visual Studio Installer, it installs the Visual Studio *platform toolset*. A platform toolset has all the C and C++ tools for a specific Visual Studio version. The tools include the C/C++ compilers, linkers, assemblers, and other build tools, and matching libraries and header files. You can use all of these tools at the command line. They're also used internally by the Visual Studio IDE. There are separate x86-hosted and x64-hosted compilers and tools to build code for x86, x64, ARM, and ARM64 targets. Each set of tools for a particular host and target build architecture is stored in its own directory. +When you choose one of the C++ workloads in the Visual Studio Installer, by default, it installs a particular version of the MSVC Build Tools package. For Visual Studio 2022 and earlier, this is organized by a *platform toolset* (v### version format) that has all the C and C++ tools for a specific version of Visual Studio. For Visual Studio 2026 and later, this consists of the MSVC version (v##.## version format), which has all the C and C++ tools for that particular MSVC package. The MSVC version is decoupled from the Visual Studio version. The tools include the C/C++ compilers, linkers, assemblers, and other build tools, and matching libraries and header files. You can use all of these tools at the command-line. They're also used internally by the Visual Studio IDE. There are separate x86-hosted and x64-hosted compilers and tools that build code for x86, x64, ARM, and ARM64 targets. Each set of tools for a particular host and target build architecture is stored in its own directory. To work correctly, the tools require several specific environment variables to be set. These variables are used to add the tools to the path, and to set the locations of include files, library files, and SDKs. To make it easy to set these environment variables, the installer creates customized *command files*, or batch files, during installation. You can run one of these command files to set a specific host and target build architecture, Windows SDK version, and platform toolset. For convenience, the installer also creates shortcuts in your Start menu. The shortcuts open developer command prompt windows by using these command files for specific combinations of host and target. These shortcuts ensure all the required environment variables are set and ready to use. diff --git a/docs/build/cmake-presets-vs.md b/docs/build/cmake-presets-vs.md index b5f46cac1be..5282a491801 100644 --- a/docs/build/cmake-presets-vs.md +++ b/docs/build/cmake-presets-vs.md @@ -265,7 +265,7 @@ For more information on generators that support the `toolset` specification, see To reproduce these builds outside Visual Studio, see [Run CMake from the command line or a CI pipeline](#run-cmake-from-the-command-line-or-a-ci-pipeline). -To build on Linux or without the Visual C++ toolset, specify the name of a compiler on your `PATH` instance, or an environment variable that evaluates to the full path of a compiler. Full paths are discouraged so that the file can remain shareable. A preset that builds with GCC version 8 might look like this: +To build on Linux or without the Microsoft C++ (MSVC) Build Tools, specify the name of a compiler on your `PATH` instance, or an environment variable that evaluates to the full path of a compiler. Full paths are discouraged so that the file can remain shareable. A preset that builds with GCC version 8 might look like this: ```json "environment": { @@ -290,7 +290,7 @@ Set `architecture.strategy` and `toolset.strategy` to `set` when you're building You can set the configuration type (`Debug` or `Release`) for single configuration generators by using `cacheVariables.CMAKE_BUILD_TYPE`. It's equivalent to passing `-D CMAKE_BUILD_TYPE=` to CMake from the command line. For more information, see [`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html). -### Select your target and host architecture when building with the Visual C++ toolset +### Select your target and host architecture when building with the Microsoft C++ Build Tools You can set the target architecture (x64, Win32, ARM64, or ARM) by using `architecture.value`. It's equivalent to passing `-A` to CMake from the command line. For more information, see [Platform Selection](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html#platform-selection). @@ -466,7 +466,7 @@ You can use the same *`CMakePresets.json`* and *`CMakeUserPresets.json`* files t ### Sourcing the environment when building with command-line generators on Windows -It's up to the user to configure the environment before CMake is invoked in building with a command-line generator. If you're building with Ninja and the Visual C++ toolset on Windows, set the environment before CMake is called to generate the build system. You can do it by calling *`vcvarsall.bat`* with the `architecture` argument. The `architecture` argument specifies the host and target architecture to use. For more information, see [`vcvarsall` syntax](./building-on-the-command-line.md#vcvarsall-syntax). If you build on Linux or on Windows with a Visual Studio Generator, you don't need to take this step. +It's up to the user to configure the environment before CMake is invoked in building with a command-line generator. If you're building with Ninja and the Microsoft C++ Build Tools on Windows, set the environment before CMake is called to generate the build system. You can do it by calling *`vcvarsall.bat`* with the `architecture` argument. The `architecture` argument specifies the host and target architecture to use. For more information, see [`vcvarsall` syntax](./building-on-the-command-line.md#vcvarsall-syntax). If you build on Linux or on Windows with a Visual Studio Generator, you don't need to take this step. It's the same step that Visual Studio takes for you when the IDE invokes CMake. Visual Studio parses the active Configure Preset for the host and target architecture specified by `toolset` and `architecture`. Visual Studio then sources the specified environment from *`vcvarsall.bat`*. When you build from the Windows command line with Ninja, you'll need to take this step yourself. diff --git a/docs/build/cmake-projects-in-visual-studio.md b/docs/build/cmake-projects-in-visual-studio.md index 0ca5262c430..5dcd6b75af3 100644 --- a/docs/build/cmake-projects-in-visual-studio.md +++ b/docs/build/cmake-projects-in-visual-studio.md @@ -147,7 +147,7 @@ You can customize a CMake debugging session by setting properties in the *`launc ### Just My Code for CMake projects -When you build for Windows using the MSVC compiler, CMake projects have support for Just My Code debugging. To change the Just My Code setting, go to **Tools** > **Options** > **Debugging** > **General**. For more information on Just My Code debugging, see [Debug only user code with Just My Code](/visualstudio/debugger/just-my-code). +When you build for Windows using the Microsoft C++ (MSVC) compiler, CMake projects have support for Just My Code debugging. To change the Just My Code setting, go to **Tools** > **Options** > **Debugging** > **General**. For more information on Just My Code debugging, see [Debug only user code with Just My Code](/visualstudio/debugger/just-my-code). ### Edit and Continue for CMake projects diff --git a/docs/build/cmakesettings-reference.md b/docs/build/cmakesettings-reference.md index e9a6acdb8ff..274b0237bf1 100644 --- a/docs/build/cmakesettings-reference.md +++ b/docs/build/cmakesettings-reference.md @@ -122,7 +122,7 @@ By default, when the active configuration specifies a Visual Studio generator, i - `remotePreGenerateCommand`: Specifies the command to run before running CMake to parse the *`CMakeLists.txt`* file. - `remotePrebuildCommand`: Specifies the command to run on the remote machine before building. - `remotePostbuildCommand`: Specifies the command to run on the remote machine after building. -- `variables`: Contains a name-value pair of CMake variables that get passed as **`-D name=value`** to CMake. If your CMake project build instructions specify the addition of any variables directly to the *`CMakeCache.txt`* file, we recommend you add them here instead. This example shows how to specify the name-value pairs to use the 14.14.26428 MSVC toolset: +- `variables`: Contains a name-value pair of CMake variables that get passed as **`-D name=value`** to CMake. If your CMake project build instructions specify the addition of any variables directly to the *`CMakeCache.txt`* file, we recommend you add them here instead. This example shows how to specify the name-value pairs to use the 14.14.26428 MSVC Build Tools: ```json "variables": [ diff --git a/docs/build/common-visual-cpp-64-bit-migration-issues.md b/docs/build/common-visual-cpp-64-bit-migration-issues.md index 531a59ee624..7d8603ea722 100644 --- a/docs/build/common-visual-cpp-64-bit-migration-issues.md +++ b/docs/build/common-visual-cpp-64-bit-migration-issues.md @@ -1,13 +1,13 @@ --- -description: "Learn more about: Common Visual C++ 64-bit Migration Issues" -title: "Common Visual C++ 64-bit Migration Issues" +description: "Learn more about: Common Microsoft C++ 64-bit Migration Issues" +title: "Common Microsoft C++ 64-bit Migration Issues" ms.date: "05/06/2019" helpviewer_keywords: ["64-bit programming [C++], migration", "64-bit compiler [C++], migration", "porting 32-bit code to 64-bit code", "migration [C++], 64-bit code issues", "32-bit code porting [C++]", "64-bit applications [C++]", "64-bit compiler [C++], porting 32-bit code", "Win64 [C++]"] ms.assetid: d17fb838-7513-4e2d-8b27-a1666f17ad76 --- -# Common Visual C++ 64-bit Migration Issues +# Common Microsoft C++ 64-bit Migration Issues -When you use the Microsoft C++ compiler (MSVC) to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues: +When you use the Microsoft C++ (MSVC) compiler to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues: - An **`int`** and a **`long`** are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable. @@ -34,4 +34,4 @@ For more information, see: ## See also [Configure C++ projects for 64-bit, x64 targets](configuring-programs-for-64-bit-visual-cpp.md)
-[Visual C++ Porting and Upgrading Guide](../porting/visual-cpp-porting-and-upgrading-guide.md) +[Microsoft C++ Porting and Upgrading Guide](../porting/visual-cpp-porting-and-upgrading-guide.md) diff --git a/docs/build/common-visual-cpp-arm-migration-issues.md b/docs/build/common-visual-cpp-arm-migration-issues.md index 36035c044bf..bd39965f08d 100644 --- a/docs/build/common-visual-cpp-arm-migration-issues.md +++ b/docs/build/common-visual-cpp-arm-migration-issues.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Common Visual C++ ARM Migration Issues" -title: "Common Visual C++ ARM Migration Issues" +description: "Learn more about: Common Microsoft C++ ARM Migration Issues" +title: "Common Microsoft C++ ARM Migration Issues" ms.date: "05/06/2019" --- -# Common Visual C++ ARM migration issues +# Common Microsoft C++ ARM migration issues This document describes some of the common issues that you might encounter when you migrate code from x86 or x64 architectures to the ARM architecture. It also describes how to avoid these issues, and how to use the compiler to help identify them. @@ -89,7 +89,7 @@ And if there's a dependency between `operator->(memory_handle)` and `operator*(p ### `volatile` keyword default behavior -The MSVC compiler supports two different interpretations of the **`volatile`** storage qualifier that you can specify by using compiler switches. The [/volatile:ms](reference/volatile-volatile-keyword-interpretation.md) switch selects the Microsoft extended volatile semantics that guarantee strong ordering, as has been the traditional case for x86 and x64 because of the strong memory model on those architectures. The [/volatile:iso](reference/volatile-volatile-keyword-interpretation.md) switch selects the strict C++ standard volatile semantics that don't guarantee strong ordering. +The Microsoft C++ (MSVC) compiler supports two different interpretations of the **`volatile`** storage qualifier that you can specify by using compiler switches. The [/volatile:ms](reference/volatile-volatile-keyword-interpretation.md) switch selects the Microsoft extended volatile semantics that guarantee strong ordering, as has been the traditional case for x86 and x64 because of the strong memory model on those architectures. The [/volatile:iso](reference/volatile-volatile-keyword-interpretation.md) switch selects the strict C++ standard volatile semantics that don't guarantee strong ordering. On the ARM architecture (except ARM64EC), the default is **/volatile:iso** because ARM processors have a weakly ordered memory model, and because ARM software doesn't have a legacy of relying on the extended semantics of **/volatile:ms** and doesn't usually have to interface with software that does. However, it's still sometimes convenient or even required to compile an ARM program to use the extended semantics. For example, it may be too costly to port a program to use the ISO C++ semantics, or driver software might have to adhere to the traditional semantics to function correctly. In these cases, you can use the **/volatile:ms** switch; however, to recreate the traditional volatile semantics on ARM targets, the compiler must insert memory barriers around each read or write of a **`volatile`** variable to enforce strong ordering, which can have a negative impact on performance. @@ -97,4 +97,4 @@ On the x86, x64, and ARM64EC architectures, the default is **/volatile:ms** beca ## See also -[Configure Visual C++ for ARM processors](configuring-programs-for-arm-processors-visual-cpp.md) +[Configure Microsoft C++ for ARM processors](configuring-programs-for-arm-processors-visual-cpp.md) diff --git a/docs/build/compare-inclusion-methods.md b/docs/build/compare-inclusion-methods.md index 8c16032aee4..2f8c25c5b6a 100644 --- a/docs/build/compare-inclusion-methods.md +++ b/docs/build/compare-inclusion-methods.md @@ -40,4 +40,4 @@ If you can't use C++20 features, use `#include` and consider precompiled headers [Overview of modules in C++](../cpp/modules-cpp.md)\ [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\ [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md#approach1)\ -[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md) \ No newline at end of file +[Walkthrough: Build and import header units in your Microsoft C++ projects](walkthrough-header-units.md) \ No newline at end of file diff --git a/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md b/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md index ef50625ae8d..2993d7abb37 100644 --- a/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md +++ b/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md @@ -24,9 +24,9 @@ At execution time, Windows uses assembly information from the application manife You can change side-by-side assembly dependencies after an application has been deployed by modifying the [Publisher Configuration Files](/windows/win32/SbsCs/publisher-configuration-files) and [Application Configuration Files](/windows/win32/SbsCs/application-configuration-files). A publisher configuration file, also known as a publisher policy file, is an XML file that globally redirects applications and assemblies from using one version of a side-by-side assembly to using another version of the same assembly. For example, you could change a dependency when a bug fix or security fix is deployed for a side-by-side assembly and you want to redirect all applications to use the fixed version. An application configuration file is an XML file that redirects a specific application from using one version of a side-by-side assembly to using another version of the same assembly. You can use an application configuration file to redirect a particular application to use a version of a side-by-side assembly that's different from the one that's defined in the publisher configuration file. For more information, see [Configuration](/windows/win32/SbsCs/configuration). -## Visual C++ libraries +## Microsoft C++ libraries -In Visual Studio 2005 and Visual Studio 2008, redistributable libraries such as ATL, MFC, CRT, Standard C++, OpenMP, and MSDIA were deployed as shared side-by-side assemblies to the native assembly cache. In the current version, the redistributable libraries use central deployment. By default, all applications that are built by using Visual Studio are built with the manifest embedded in the final binary, and the manifest describes the dependencies of the binary on the Visual C++ libraries. To understand manifest generation for C++ applications, see [Understanding Manifest Generation for C/C++ Programs](understanding-manifest-generation-for-c-cpp-programs.md). A manifest is not required for applications that are statically linked to the libraries that they use, or that use local deployment. For more information about deployment, see [Deployment in Visual C++](../windows/deployment-in-visual-cpp.md). +In Visual Studio 2005 and Visual Studio 2008, redistributable libraries such as ATL, MFC, CRT, Standard C++, OpenMP, and MSDIA were deployed as shared side-by-side assemblies to the native assembly cache. In the current version, the redistributable libraries use central deployment. By default, all applications that are built by using Visual Studio are built with the manifest embedded in the final binary, and the manifest describes the dependencies of the binary on the Microsoft C++ libraries. To understand manifest generation for C++ applications, see [Understanding Manifest Generation for C/C++ Programs](understanding-manifest-generation-for-c-cpp-programs.md). A manifest is not required for applications that are statically linked to the libraries that they use, or that use local deployment. For more information about deployment, see [Deployment in Microsoft C++](../windows/deployment-in-visual-cpp.md). ## See also diff --git a/docs/build/configuring-programs-for-64-bit-visual-cpp.md b/docs/build/configuring-programs-for-64-bit-visual-cpp.md index e922af4027d..845be402593 100644 --- a/docs/build/configuring-programs-for-64-bit-visual-cpp.md +++ b/docs/build/configuring-programs-for-64-bit-visual-cpp.md @@ -7,15 +7,15 @@ ms.assetid: cb99f72b-8c74-48f4-846a-8921b37b97e9 --- # Configure C++ projects for 64-bit, x64 targets -This section contains topics about targeting 64-bit x64 hardware with the Visual C++ build tools. +This section contains topics about targeting 64-bit x64 hardware with the Microsoft C++ (MSVC) Build Tools. ## In This Section -- [How to: Configure Visual C++ Projects to Target 64-Bit, x64 Platforms](how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md) +- [How to: Configure Microsoft C++ Projects to Target 64-Bit, x64 Platforms](how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md) - [How to: Enable a 64-bit, x64-hosted MSVC toolset on the command line](how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md) -- [Common Visual C++ 64-bit Migration Issues](common-visual-cpp-64-bit-migration-issues.md) +- [Common Microsoft C++ 64-bit Migration Issues](common-visual-cpp-64-bit-migration-issues.md) - [x64 Software Conventions](x64-software-conventions.md) diff --git a/docs/build/configuring-programs-for-arm-processors-visual-cpp.md b/docs/build/configuring-programs-for-arm-processors-visual-cpp.md index fc99baa1b25..bb6e7c40dc9 100644 --- a/docs/build/configuring-programs-for-arm-processors-visual-cpp.md +++ b/docs/build/configuring-programs-for-arm-processors-visual-cpp.md @@ -5,7 +5,7 @@ ms.date: "07/11/2018" --- # Configure C++ projects for ARM processors -This section of the documentation contains information about how to use the MSVC build tools to target ARM hardware. +This section of the documentation contains information about how to use the Microsoft C++ (MSVC) Build Tools to target ARM hardware. ## In This Section diff --git a/docs/build/creating-precompiled-header-files.md b/docs/build/creating-precompiled-header-files.md index 2b0f1f5ebe1..ec450093ce7 100644 --- a/docs/build/creating-precompiled-header-files.md +++ b/docs/build/creating-precompiled-header-files.md @@ -348,5 +348,5 @@ int main( void ) [MSVC compiler options](reference/compiler-options.md)\ [Overview of modules in C++](../cpp/modules-cpp.md)\ [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\ -[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)\ +[Walkthrough: Build and import header units in your Microsoft C++ projects](walkthrough-header-units.md)\ [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md#approach1) diff --git a/docs/build/determining-which-exporting-method-to-use.md b/docs/build/determining-which-exporting-method-to-use.md index 58d6c4432c2..f34d60e3e3b 100644 --- a/docs/build/determining-which-exporting-method-to-use.md +++ b/docs/build/determining-which-exporting-method-to-use.md @@ -19,7 +19,7 @@ Exporting functions in a .def file gives you control over the export ordinals. W Another advantage to using a .def file is that you can use the `NONAME` attribute to export a function. This puts only the ordinal in the exports table in the DLL. For DLLs that have a large number of exported functions, using the `NONAME` attribute can reduce the size of the DLL file. For information about how to write a module definition statement, see [Rules for Module-Definition Statements](reference/rules-for-module-definition-statements.md). For information about ordinal export, see [Exporting Functions from a DLL by Ordinal Rather Than by Name](exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md). -A disadvantage of using a .def file is that if you are exporting functions in a C++ file, you either have to put the decorated names in the .def file or define the exported functions by using extern "C" to avoid the name decoration that's done by the MSVC compiler. +A disadvantage of using a .def file is that if you are exporting functions in a C++ file, you either have to put the decorated names in the .def file or define the exported functions by using extern "C" to avoid the name decoration that's done by the Microsoft C++ (MSVC) compiler. If you put the decorated names in the .def file, you can obtain them by using the [DUMPBIN](reference/dumpbin-reference.md) tool or by using the linker [/MAP](reference/map-generate-mapfile.md) option. The decorated names that are produced by the compiler are compiler-specific; therefore, if you put the decorated names that are produced by the compiler into a .def file, the applications that link to the DLL must also be built by using the same version of the compiler so that the decorated names in the calling application match the exported names in the .def file of the DLL. diff --git a/docs/build/dlls-in-visual-cpp.md b/docs/build/dlls-in-visual-cpp.md index a1974a8268a..cf7683b6c21 100644 --- a/docs/build/dlls-in-visual-cpp.md +++ b/docs/build/dlls-in-visual-cpp.md @@ -68,7 +68,7 @@ Describes explicit and implicit linking to a DLL. [Initialize a DLL](run-time-library-behavior.md#initializing-a-dll)\ Discusses DLL initialization code that must execute when your DLL loads. -[DLLs and Visual C++ run-time library behavior](run-time-library-behavior.md)\ +[DLLs and Microsoft C++ run-time library behavior](run-time-library-behavior.md)\ Describes the run-time library DLL startup sequence. [LoadLibrary and AfxLoadLibrary](loadlibrary-and-afxloadlibrary.md)\ diff --git a/docs/build/exception-handling-x64.md b/docs/build/exception-handling-x64.md index 41a6e29b6e4..8e35eb70ffd 100644 --- a/docs/build/exception-handling-x64.md +++ b/docs/build/exception-handling-x64.md @@ -7,7 +7,7 @@ ms.assetid: 41fecd2d-3717-4643-b21c-65dcd2f18c93 --- # x64 exception handling -An overview of structured exception handling and C++ exception handling coding conventions and behavior on the x64. For general information on exception handling, see [Exception Handling in Visual C++](../cpp/exception-handling-in-visual-cpp.md). +An overview of structured exception handling and C++ exception handling coding conventions and behavior on the x64. For general information on exception handling, see [Exception Handling in Microsoft C++](../cpp/exception-handling-in-visual-cpp.md). ## Unwind data for exception handling, debugger support diff --git a/docs/build/exporting-from-a-dll-using-def-files.md b/docs/build/exporting-from-a-dll-using-def-files.md index ce1b224eede..653273a5fe2 100644 --- a/docs/build/exporting-from-a-dll-using-def-files.md +++ b/docs/build/exporting-from-a-dll-using-def-files.md @@ -29,7 +29,7 @@ EXPORTS If you use the [MFC DLL Wizard](../mfc/reference/mfc-dll-wizard.md) to create an MFC DLL, the wizard creates a skeleton DEF file for you and automatically adds it to your project. Add the names of the functions to be exported to this file. For non-MFC DLLs, create the DEF file yourself and add it to your project. Then go to **Project** > **Properties** > **Linker** > **Input** > **Module Definition File** and enter the name of the DEF file. Repeat this step for each configuration and platform, or do it all at once by selecting **Configuration = All Configurations**, and **Platform = All Platforms**. -If you are exporting functions in a C++ file, you have to either place the decorated names in the DEF file or define your exported functions with standard C linkage by using extern "C". If you need to place the decorated names in the DEF file, you can obtain them by using the [DUMPBIN](../build/reference/dumpbin-reference.md) tool or by using the linker [/MAP](../build/reference/map-generate-mapfile.md) option. Note that the decorated names produced by the compiler are compiler specific. If you place the decorated names produced by the Microsoft C++ compiler (MSVC) into a DEF file, applications that link to your DLL must also be built using the same version of MSVC so that the decorated names in the calling application match the exported names in the DLL's DEF file. +If you are exporting functions in a C++ file, you have to either place the decorated names in the DEF file or define your exported functions with standard C linkage by using extern "C". If you need to place the decorated names in the DEF file, you can obtain them by using the [DUMPBIN](../build/reference/dumpbin-reference.md) tool or by using the linker [/MAP](../build/reference/map-generate-mapfile.md) option. Note that the decorated names produced by the compiler are compiler specific. If you place the decorated names produced by the Microsoft C++ (MSVC) compiler into a DEF file, applications that link to your DLL must also be built using the same version of MSVC so that the decorated names in the calling application match the exported names in the DLL's DEF file. > [!NOTE] > A DLL built with Visual Studio 2015 can be consumed by applications built with Visual Studio 2017 or Visual Studio 2019. diff --git a/docs/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md b/docs/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md index 4e5fb870095..e551b430faf 100644 --- a/docs/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md +++ b/docs/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md @@ -27,7 +27,7 @@ Any of the native or cross compiler tools build configurations can be used on th > [!NOTE] > For information about the specific tools that are included with each Visual Studio edition, see [Visual C++ Tools and Features in Visual Studio Editions](../overview/visual-cpp-tools-and-features-in-visual-studio-editions.md). > -> For information about how to use the Visual Studio IDE to create 64-bit applications, see [How to: Configure Visual C++ Projects to Target 64-Bit, x64 Platforms](how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md). +> For information about how to use the Visual Studio IDE to create 64-bit applications, see [How to: Configure Microsoft C++ Projects to Target 64-Bit, x64 Platforms](how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md). When you install a C++ workload in the Visual Studio installer, it always installs 32-bit, x86-hosted, native and cross compiler tools to build x86 and x64 code. If you include the Universal Windows Platform workload, it also installs x86-hosted cross compiler tools to build ARM code. If you install these workloads on a 64-bit, x64 processor, you also get 64-bit native and cross compiler tools to build x86, x64, and ARM code. The 32-bit and 64-bit tools generate identical code, but the 64-bit tools support more memory for precompiled header symbols and the Whole Program Optimization ([/GL](reference/gl-whole-program-optimization.md) and [/LTCG](reference/ltcg-link-time-code-generation.md)) options. If you run into memory limits when you use the 32-bit tools, try the 64-bit tools. diff --git a/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md b/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md index a91d9d91583..3c80c787b4a 100644 --- a/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md +++ b/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md @@ -10,7 +10,7 @@ You can edit a Visual Studio C++ project file to target different versions of th ## Platform toolset -The platform toolset consists of the C++ compiler (cl.exe) and linker (link.exe), along with the C/C++ standard libraries. Visual Studio 2015, Visual Studio 2017, and Visual Studio 2019 are binary-compatible. It's shown by the major version of the toolset, which has remained at 14. Projects compiled in Visual Studio 2019 or Visual Studio 2017 are ABI-backwards-compatible with 2017 and 2015 projects. The minor version has updated by 1 for each version since Visual Studio 2015: +The platform toolset consists of the Microsoft C++ (MSVC) compiler (cl.exe) and linker (link.exe), along with the C/C++ standard libraries. Visual Studio 2015, Visual Studio 2017, and Visual Studio 2019 are binary-compatible. It's shown by the major version of the toolset, which has remained at 14. Projects compiled in Visual Studio 2019 or Visual Studio 2017 are ABI-backwards-compatible with 2017 and 2015 projects. The minor version has updated by 1 for each version since Visual Studio 2015: - Visual Studio 2015: v140 - Visual Studio 2017: v141 @@ -25,7 +25,7 @@ Visual Studio also supports multitargeting for C++ projects. You can use the lat When you change the target Framework, also change the platform toolset to a version that supports that Framework. For example, to target the .NET Framework 4.5, you must use a compatible platform toolset. These toolsets include Visual Studio 2015 (v140), Visual Studio 2013 (v120), or Visual Studio 2012 (v110). You can use the [Windows 7.1 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=8442) to target .NET Framework 2.0, 3.0, 3.5, and 4. -You can extend the target platform further by creating a custom platform toolset. For more information, see [C++ Native Multi-Targeting](https://devblogs.microsoft.com/cppblog/c-native-multi-targeting/) on the Visual C++ blog. +You can extend the target platform further by creating a custom platform toolset. For more information, see [C++ Native Multi-Targeting](https://devblogs.microsoft.com/cppblog/c-native-multi-targeting/) on the Microsoft C++ Team blog. ### To change the target Framework diff --git a/docs/build/importing-using-def-files.md b/docs/build/importing-using-def-files.md index 877708fe77e..f8cd00daca4 100644 --- a/docs/build/importing-using-def-files.md +++ b/docs/build/importing-using-def-files.md @@ -50,7 +50,7 @@ if (ulDataInDll == 0L) /*sample code fragment*/ Using CONSTANT is more risky because if you forget to use the extra level of indirection, you could potentially access the import address table's pointer to the variable — not the variable itself. This type of problem can often manifest as an access violation because the import address table is currently made read-only by the compiler and linker. -The current MSVC linker issues a warning if it sees CONSTANT in the .def file to account for this case. The only real reason to use CONSTANT is if you cannot recompile some object file where the header file did not list **`__declspec(dllimport)`** on the prototype. +The current Microsoft C++ (MSVC) linker issues a warning if it sees CONSTANT in the .def file to account for this case. The only real reason to use CONSTANT is if you cannot recompile some object file where the header file did not list **`__declspec(dllimport)`** on the prototype. ## See also diff --git a/docs/build/msbuild-visual-cpp.md b/docs/build/msbuild-visual-cpp.md index 0066c81f6d9..858b524a7e4 100644 --- a/docs/build/msbuild-visual-cpp.md +++ b/docs/build/msbuild-visual-cpp.md @@ -44,7 +44,7 @@ Lists the MSBuild XML Schema elements, together with their attributes, and paren Describes the command-line arguments and options that you can use with msbuild.exe. - [Task Reference](/visualstudio/msbuild/msbuild-task-reference) -Describes MSBuild tasks. Especially note these tasks, which are specific to Visual C++: [BscMake Task](/visualstudio/msbuild/bscmake-task), [CL Task](/visualstudio/msbuild/cl-task), [CPPClean Task](/visualstudio/msbuild/cppclean-task), [LIB Task](/visualstudio/msbuild/lib-task), [Link Task](/visualstudio/msbuild/link-task), [MIDL Task](/visualstudio/msbuild/midl-task), [MT Task](/visualstudio/msbuild/mt-task), [RC Task](/visualstudio/msbuild/rc-task), [SetEnv Task](/visualstudio/msbuild/setenv-task), [VCMessage Task](/visualstudio/msbuild/vcmessage-task) +Describes MSBuild tasks. Especially note these tasks, which are specific to Microsoft C++: [BscMake Task](/visualstudio/msbuild/bscmake-task), [CL Task](/visualstudio/msbuild/cl-task), [CPPClean Task](/visualstudio/msbuild/cppclean-task), [LIB Task](/visualstudio/msbuild/lib-task), [Link Task](/visualstudio/msbuild/link-task), [MIDL Task](/visualstudio/msbuild/midl-task), [MT Task](/visualstudio/msbuild/mt-task), [RC Task](/visualstudio/msbuild/rc-task), [SetEnv Task](/visualstudio/msbuild/setenv-task), [VCMessage Task](/visualstudio/msbuild/vcmessage-task) ## In This Section diff --git a/docs/build/overview-of-arm-abi-conventions.md b/docs/build/overview-of-arm-abi-conventions.md index 5ab221541eb..0b80497f7ac 100644 --- a/docs/build/overview-of-arm-abi-conventions.md +++ b/docs/build/overview-of-arm-abi-conventions.md @@ -8,7 +8,7 @@ ms.date: "07/11/2018" The application binary interface (ABI) for code compiled for Windows on ARM processors is based on the standard ARM EABI. This article highlights key differences between Windows on ARM and the standard. This document covers the ARM32 ABI. For information about the ARM64 ABI, see [Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md). For more information about the standard ARM EABI, see [Application Binary Interface (ABI) for the ARM Architecture](https://github.com/ARM-software/abi-aa) (external link). > [!NOTE] -> Using the Microsoft Visual C++ (MSVC) build tools to target ARM32 is deprecated starting with Visual Studio 2026. If you need to target ARM32, use the Visual Studio 2022 v143 build tools. +> Using the Microsoft C++ (MSVC) Build Tools to target ARM32 is deprecated starting with Visual Studio 2026. If you need to target ARM32, use the Visual Studio 2022 v143 build tools. ## Base Requirements @@ -196,5 +196,5 @@ The counter is a true cycle counter, not a clock; therefore, the counting freque ## See also -[Common Visual C++ ARM Migration Issues](common-visual-cpp-arm-migration-issues.md)
+[Common Microsoft C++ ARM Migration Issues](common-visual-cpp-arm-migration-issues.md)
[ARM Exception Handling](arm-exception-handling.md) diff --git a/docs/build/projects-and-build-systems-cpp.md b/docs/build/projects-and-build-systems-cpp.md index 156cd4acfd8..511330c45a4 100644 --- a/docs/build/projects-and-build-systems-cpp.md +++ b/docs/build/projects-and-build-systems-cpp.md @@ -9,7 +9,7 @@ ms.custom: intro-overview --- # C/C++ projects and build systems in Visual Studio -You can use Visual Studio to edit, compile, and build any C++ code base with full IntelliSense support without having to convert that code into a Visual Studio project or compile with the MSVC toolset. For example, you can edit a cross-platform CMake project in Visual Studio on a Windows machine, then compile it for Linux using g++ on a remote Linux machine. +You can use Visual Studio to edit, compile, and build any C++ code base with full IntelliSense support without having to convert that code into a Visual Studio project or compile with the Microsoft C++ (MSVC) Build Tools. For example, you can edit a cross-platform CMake project in Visual Studio on a Windows machine, then compile it for Linux using g++ on a remote Linux machine. ## C++ compilation @@ -21,9 +21,9 @@ Basic C++ compilation involves three main steps: - The C++ compiler compiles each translation unit into object files (.obj), applying whatever compiler options have been set. - The *linker* merges the object files into a single executable, applying the linker options that have been set. -## The MSVC toolset +## The Microsoft C++ (MSVC) Build Tools -The Microsoft C++ compiler, linker, standard libraries, and related utilities make up the MSVC compiler toolset (also called a toolchain or "build tools"). These are included in Visual Studio. You can also download and use the command-line toolset as a free standalone package. For more information, see [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) on the Visual Studio Downloads page. +The Microsoft C++ compiler, linker, standard libraries, and related utilities make up the Microsoft C++ (MSVC) Build Tools (also called a toolchain or toolset). These are included in Visual Studio. You can also download and use the command-line toolset as a free standalone package. For more information, see [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) on the Visual Studio Downloads page. You can build simple programs by invoking the MSVC compiler (cl.exe) directly from the command line. The following command accepts a single source code file, and invokes cl.exe to build an executable called *hello.exe*: @@ -83,7 +83,7 @@ Describes the deployment model for Windows Desktop applications, based on the id How to target 64-bit x64 hardware with the MSVC build tools. [Configure C++ projects for ARM processors](configuring-programs-for-arm-processors-visual-cpp.md)\ -How to use the MSVC build tools to target ARM hardware. +How to use the MSVC Build Tools to target ARM hardware. [Optimizing Your Code](optimizing-your-code.md)\ How to optimize your code in various ways including program guided optimizations. diff --git a/docs/build/reference/c-cpp-prop-page.md b/docs/build/reference/c-cpp-prop-page.md index 4f92e38d17f..b43746b08b6 100644 --- a/docs/build/reference/c-cpp-prop-page.md +++ b/docs/build/reference/c-cpp-prop-page.md @@ -387,7 +387,7 @@ Experimental support for the C++ Modules TS and Standard Library modules. ### Build ISO C++23 Standard Library Modules -Starting in Visual Studio 17.6, when this property is enabled and [C++ Language Standard](#cpplang) is set to `/std:c++latest`, Visual C++ projects automatically find and build ISO C++23 Standard Library modules. This enables you to `import std` or `import std.compat` in your C++ code. +Starting in Visual Studio 17.6, when this property is enabled and [C++ Language Standard](#cpplang) is set to `/std:c++latest`, Microsoft C++ projects automatically find and build ISO C++23 Standard Library modules. This enables you to `import std` or `import std.compat` in your C++ code. ## C/C++ Precompiled Headers Properties diff --git a/docs/build/reference/fsanitize.md b/docs/build/reference/fsanitize.md index 6e9e8c94395..e1eef40728d 100644 --- a/docs/build/reference/fsanitize.md +++ b/docs/build/reference/fsanitize.md @@ -37,7 +37,7 @@ The **`/fsanitize-address-use-after-return`**, **`/fno-sanitize-address-vcasan-l 1. Select the **Configuration Properties** > **C/C++** > **General** property page. -1. Modify the **Enable Address Sanitizer** property. To enable it, choose **Yes (/fsanitize=address)**. +1. Modify the **Enable AddressSanitizer** property. To enable it, choose **Yes (/fsanitize=address)**. 1. Choose **OK** or **Apply** to save your changes. diff --git a/docs/build/reference/general-property-page-project.md b/docs/build/reference/general-property-page-project.md index 5fd0640279f..b06af7088be 100644 --- a/docs/build/reference/general-property-page-project.md +++ b/docs/build/reference/general-property-page-project.md @@ -77,7 +77,7 @@ You can use project macros to change the directory location. For more informatio ### Platform Toolset -Specifies the toolset used for building the current configuration. This property allows the project to target a different version of the Visual C++ libraries and compiler. By default, Visual Studio C++ projects target the latest toolset installed by Visual Studio. You can choose one of the toolsets installed by several previous versions of Visual Studio instead. Some older toolsets can create executables that run on Windows XP or Vista. For more information on how to change the platform toolset, see [How to: Modify the target framework and platform toolset](../how-to-modify-the-target-framework-and-platform-toolset.md). +Specifies the toolset used for building the current configuration. This property allows the project to target a different version of the Microsoft C++ libraries and compiler. By default, Visual Studio C++ projects target the latest toolset installed by Visual Studio. You can choose one of the toolsets installed by several previous versions of Visual Studio instead. Some older toolsets can create executables that run on Windows XP or Vista. For more information on how to change the platform toolset, see [How to: Modify the target framework and platform toolset](../how-to-modify-the-target-framework-and-platform-toolset.md). ### Enable Managed Incremental Build diff --git a/docs/build/reference/linking.md b/docs/build/reference/linking.md index 8891ebf554d..1934bea919d 100644 --- a/docs/build/reference/linking.md +++ b/docs/build/reference/linking.md @@ -68,8 +68,8 @@ link /dll @objlist.txt @liblist.txt @exports.txt The linker recognizes the following environment variables: - `LINK` and `_LINK_`, if defined. The linker prepends the options and arguments defined in the `LINK` environment variable and appends the options and arguments defined in the `_LINK_` environment variable to the command line arguments before processing. -- `LIB`, if defined. The linker uses the `LIB` path when it searches for an object, library, or other file specified on the command line or by the [`/BASE`](base-base-address.md) option. It also uses the `LIB` path to find a `.pdb` file named in an object. The `LIB` variable can contain one or more path specifications, separated by semicolons. One path must point to the `\lib` subdirectory of your Visual C++ installation. -- `PATH`, if the tool needs to run `CVTRES` and can't find the file in the same directory as `link.exe` itself. (`link.exe` requires `CVTRES` to link a `.res` file.) `PATH` must point to the `\bin` subdirectory of your Visual C++ installation. +- `LIB`, if defined. The linker uses the `LIB` path when it searches for an object, library, or other file specified on the command line or by the [`/BASE`](base-base-address.md) option. It also uses the `LIB` path to find a `.pdb` file named in an object. The `LIB` variable can contain one or more path specifications, separated by semicolons. One path must point to the `\lib` subdirectory of your Microsoft C++ installation. +- `PATH`, if the tool needs to run `CVTRES` and can't find the file in the same directory as `link.exe` itself. (`link.exe` requires `CVTRES` to link a `.res` file.) `PATH` must point to the `\bin` subdirectory of your Microsoft C++ installation. - `TMP`, to specify a directory when linking OMF or `.res` files. ## See also diff --git a/docs/build/reference/microsoft-extensions-to-c-and-cpp.md b/docs/build/reference/microsoft-extensions-to-c-and-cpp.md index 77eceff58eb..57eab588697 100644 --- a/docs/build/reference/microsoft-extensions-to-c-and-cpp.md +++ b/docs/build/reference/microsoft-extensions-to-c-and-cpp.md @@ -6,7 +6,7 @@ helpviewer_keywords: ["or_eq operator", "~ operator, extensions to C/C++", "& op --- # Microsoft extensions to C and C++ -Microsoft Visual C++ (MSVC) extends the C and C++ language standards in several ways, detailed in this article. +Microsoft C++ (MSVC) extends the C and C++ language standards in several ways, detailed in this article. The MSVC C++ compiler defaults to support for ISO C++14 with some ISO C++17 features and some Microsoft-specific language extensions. For more information on supported features, see [Microsoft C/C++ language conformance by Visual Studio version](../../overview/visual-cpp-language-conformance.md). You can use the **`/std`** compiler option to enable full support for ISO C++17 and ISO C++20 language features. For more information, see [`/std` (Specify language standard version)](std-specify-language-standard-version.md). diff --git a/docs/build/reference/msbuild-visual-cpp-overview.md b/docs/build/reference/msbuild-visual-cpp-overview.md index e614f2f98a6..7ea809fa747 100644 --- a/docs/build/reference/msbuild-visual-cpp-overview.md +++ b/docs/build/reference/msbuild-visual-cpp-overview.md @@ -84,7 +84,7 @@ To use MSBuild effectively, it helps to know which properties and targets are us ### `PlatformToolset` property -The `PlatformToolset` property determines which MSVC toolset is used in the build. By default, the current toolset is used. When this property is set, its value gets concatenated with literal strings to form the path. It's the directory that contains the property and target files required to build a project for a particular platform. The platform toolset must be installed to build by using that platform toolset version. +The `PlatformToolset` property determines which Microsoft C++ (MSVC) toolset is used in the build. By default, the current toolset is used. When this property is set, its value gets concatenated with literal strings to form the path. It's the directory that contains the property and target files required to build a project for a particular platform. The platform toolset must be installed to build by using that platform toolset version. For example, set the `PlatformToolset` property to `v140` to use Visual Studio 2015 tools and libraries to build your application: diff --git a/docs/build/reference/vcxproj-file-structure.md b/docs/build/reference/vcxproj-file-structure.md index d2ba07e23ff..2071e7e393d 100644 --- a/docs/build/reference/vcxproj-file-structure.md +++ b/docs/build/reference/vcxproj-file-structure.md @@ -7,7 +7,7 @@ ms.assetid: 14d0c552-29db-480e-80c1-7ea89d6d8e9c --- # `.vcxproj` and `.props` file structure -[MSBuild](../msbuild-visual-cpp.md) is the default project system in Visual Studio; when you choose **File** > **New Project** in Visual C++ you're creating an MSBuild project whose settings are stored in an XML project file that has the extension *`.vcxproj`*. The project file may also import *`.props`* files and *`.targets`* files where settings can be stored. +[MSBuild](../msbuild-visual-cpp.md) is the default project system in Visual Studio; when you choose **File** > **New Project**, in most cases you're creating an MSBuild project whose settings are stored in an XML project file that has the extension *`.vcxproj`*. The project file may also import *`.props`* files and *`.targets`* files where settings can be stored. If you intend to maintain your project properties in the IDE, we recommend you only create and modify your *`.vcxproj`* projects in the IDE, and avoid manual edits to the files. In most cases, you never need to manually edit the project file. Manual edits may break the project connections required to modify project settings in the Visual Studio property pages, and can cause build errors that are difficult to debug and repair. For more information about using the property pages, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). @@ -188,7 +188,7 @@ The `PropertySheets` group contains the imports for user property sheets. These ``` -`UserMacros` contains properties you create as variables that are used to customize your build process. For example, you can define a user macro to define your custom output path as $(CustomOutputPath) and use it to define other variables. This property group houses such properties. In Visual Studio, this group isn't populated in the project file because Visual C++ doesn't support user macros for configurations. User macros are supported in property sheets. +`UserMacros` contains properties you create as variables that are used to customize your build process. For example, you can define a user macro to define your custom output path as $(CustomOutputPath) and use it to define other variables. This property group houses such properties. In Visual Studio, this group isn't populated in the project file because Microsoft C++ doesn't support user macros for configurations. User macros are supported in property sheets. ### Per-configuration PropertyGroup elements diff --git a/docs/build/reference/visual-cpp-project-types.md b/docs/build/reference/visual-cpp-project-types.md index 41e998d56e9..baebf7c6045 100644 --- a/docs/build/reference/visual-cpp-project-types.md +++ b/docs/build/reference/visual-cpp-project-types.md @@ -1,6 +1,6 @@ --- description: "Learn more about: C++ project templates" -title: "Visual C++ Project Types" +title: "Microsoft C++ Project Types" ms.date: "08/13/2019" helpviewer_keywords: ["programs [C++], projects", "project templates [Visual Studio], C++", "TODO comments [C++]", "projects [C++], types", "templates [C++], projects", "applications [C++], projects", "C++ projects, types"] ms.assetid: 7337987e-1e7b-4120-9a4b-94f0401f15e7 diff --git a/docs/build/regular-dlls-statically-linked-to-mfc.md b/docs/build/regular-dlls-statically-linked-to-mfc.md index d3d90f05184..4faae4e7bb4 100644 --- a/docs/build/regular-dlls-statically-linked-to-mfc.md +++ b/docs/build/regular-dlls-statically-linked-to-mfc.md @@ -9,7 +9,7 @@ ms.assetid: 2eed531c-726a-4b8a-b936-f721dc00a7fa A regular MFC DLL statically linked to MFC is a DLL that uses MFC internally, and the exported functions in the DLL can be called by either MFC or non-MFC executables. As the name describes, this kind of DLL is built using the static link library version of MFC. Functions are usually exported from a regular MFC DLL using the standard C interface. For an example of how to write, build, and use a regular MFC DLL, see the sample [DLLScreenCap](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/advanced/DllScreenCap). -Note that the term USRDLL is no longer used in the Visual C++ documentation. A regular MFC DLL that is statically linked to MFC has the same characteristics as the former USRDLL. +Note that the term USRDLL is no longer used in the Microsoft C++ documentation. A regular MFC DLL that is statically linked to MFC has the same characteristics as the former USRDLL. A regular MFC DLL, statically linked to MFC, has the following features: diff --git a/docs/build/run-time-library-behavior.md b/docs/build/run-time-library-behavior.md index 1a85ae8d849..ad23da72e29 100644 --- a/docs/build/run-time-library-behavior.md +++ b/docs/build/run-time-library-behavior.md @@ -1,5 +1,5 @@ --- -description: "Learn more about: DLLs and Visual C++ run-time library behavior" +description: "Learn more about: DLLs and Microsoft C++ run-time library behavior" title: "DLLs and Visual C++ run-time library behavior" ms.date: "08/19/2019" f1_keywords: ["_DllMainCRTStartup", "CRT_INIT"] diff --git a/docs/build/stack-usage.md b/docs/build/stack-usage.md index 8a2a87b36dd..59c102e5ec9 100644 --- a/docs/build/stack-usage.md +++ b/docs/build/stack-usage.md @@ -41,7 +41,7 @@ A leaf function is one that does not require a function table entry. It can't ma ## malloc alignment -[malloc](../c-runtime-library/reference/malloc.md) is guaranteed to return memory that's suitably aligned for storing any object that has a fundamental alignment and that could fit in the amount of memory that's allocated. A *fundamental alignment* is an alignment that's less than or equal to the largest alignment that's supported by the implementation without an alignment specification. (In Visual C++, this is the alignment that's required for a **`double`**, or 8 bytes. In code that targets 64-bit platforms, it's 16 bytes.) For example, a four-byte allocation would be aligned on a boundary that supports any four-byte or smaller object. +[malloc](../c-runtime-library/reference/malloc.md) is guaranteed to return memory that's suitably aligned for storing any object that has a fundamental alignment and that could fit in the amount of memory that's allocated. A *fundamental alignment* is an alignment that's less than or equal to the largest alignment that's supported by the implementation without an alignment specification. (In Microsoft C++, this is the alignment that's required for a **`double`**, or 8 bytes. In code that targets 64-bit platforms, it's 16 bytes.) For example, a four-byte allocation would be aligned on a boundary that supports any four-byte or smaller object. Visual C++ permits types that have *extended alignment*, which are also known as *over-aligned* types. For example, the SSE types [__m128](../cpp/m128.md) and `__m256`, and types that are declared by using `__declspec(align( n ))` where `n` is greater than 8, have extended alignment. Memory alignment on a boundary that's suitable for an object that requires extended alignment is not guaranteed by `malloc`. To allocate memory for over-aligned types, use [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) and related functions. diff --git a/docs/build/toc.yml b/docs/build/toc.yml index b5614f10a74..57a47a03ffb 100644 --- a/docs/build/toc.yml +++ b/docs/build/toc.yml @@ -83,7 +83,7 @@ items: - name: "Header units" expanded: false items: - - name: "Walkthrough: Build and import header units in Visual C++ projects" + - name: "Walkthrough: Build and import header units in Microsoft C++ projects" href: ../build/walkthrough-header-units.md - name: "Walkthrough: Import STL libraries as header units" href: ../build/walkthrough-import-stl-header-units.md diff --git a/docs/build/troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md b/docs/build/troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md index e6b026bfbad..77c17b97ece 100644 --- a/docs/build/troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md +++ b/docs/build/troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md @@ -24,7 +24,7 @@ If your application has no manifest and depends on a DLL that Windows can't find If your application is deployed on a computer that doesn't have Visual Studio, and it crashes with error messages that resemble the previous ones, check these things: -1. Follow the steps that are described in [Understanding the Dependencies of a Visual C++ Application](../windows/understanding-the-dependencies-of-a-visual-cpp-application.md). The dependency walker can show most dependencies for an application or DLL. If you observe that some DLLs are missing, install them on the computer on which you are trying to run your application. +1. Follow the steps that are described in [Understanding the Dependencies of a Microsoft C++ Application](../windows/understanding-the-dependencies-of-a-visual-cpp-application.md). The dependency walker can show most dependencies for an application or DLL. If you observe that some DLLs are missing, install them on the computer on which you are trying to run your application. 1. The operating system loader uses the application manifest to load assemblies that the application depends on. The manifest can either be embedded in the binary as a resource, or installed as a separate file in the application folder. To check whether the manifest is embedded in the binary, open the binary in Visual Studio and look for RT_MANIFEST in its list of resources. If you can't find an embedded manifest, look in the application folder for a file that's named something like .\.manifest. @@ -41,7 +41,7 @@ If your application is deployed on a computer that doesn't have Visual Studio, a ## Example -Assume we have an application, appl.exe, that's built by using Visual C++. The application manifest either is embedded in appl.exe as the binary resource RT_MANIFEST, which has an ID equal to 1, or is stored as the separate file appl.exe.manifest. The content of this manifest resembles this: +Assume we have an application, appl.exe, that's built using Microsoft C++ Build Tools. The application manifest either is embedded in appl.exe as the binary resource RT_MANIFEST, which has an ID equal to 1, or is stored as the separate file appl.exe.manifest. The content of this manifest resembles this: ``` diff --git a/docs/build/understanding-custom-build-steps-and-build-events.md b/docs/build/understanding-custom-build-steps-and-build-events.md index 7827264c812..78632dad4e1 100644 --- a/docs/build/understanding-custom-build-steps-and-build-events.md +++ b/docs/build/understanding-custom-build-steps-and-build-events.md @@ -8,7 +8,7 @@ ms.topic: how-to --- # Understanding Custom Build Steps and Build Events -From within the Visual C++ development environment, there are three basic ways to customize the build process: +Within the C++ development environment, there are three basic ways to customize the build process: - **Custom Build Steps** diff --git a/docs/build/understanding-manifest-generation-for-c-cpp-programs.md b/docs/build/understanding-manifest-generation-for-c-cpp-programs.md index c0bc39deb76..0db61f8486a 100644 --- a/docs/build/understanding-manifest-generation-for-c-cpp-programs.md +++ b/docs/build/understanding-manifest-generation-for-c-cpp-programs.md @@ -9,7 +9,7 @@ ms.topic: how-to A [manifest](/windows/win32/sbscs/manifests) is an XML document that uniquely identifies an assembly. It contains information used for binding and activation, such as COM classes, interfaces, and type libraries. A manifest can be an external XML file or a resource embedded inside an application or an assembly. The manifest of an [isolated application](/windows/win32/SbsCs/isolated-applications) is used to manage the names and versions of shared side-by-side assemblies the application should bind to at run time. The manifest of a side-by-side assembly specifies its dependencies on names, versions, resources, and other assemblies. -There are two ways to create a manifest for an isolated application or a side-by-side assembly. First, the author of the assembly can manually create a manifest file by following the rules and naming requirements. For more information, see [Manifest files reference](/windows/win32/sbscs/manifest-files-reference). Alternatively, if a program only depends on MSVC assemblies such as CRT, MFC, ATL or others, then the linker can generate a manifest automatically. +There are two ways to create a manifest for an isolated application or a side-by-side assembly. First, the author of the assembly can manually create a manifest file by following the rules and naming requirements. For more information, see [Manifest files reference](/windows/win32/sbscs/manifest-files-reference). Alternatively, if a program only depends on Microsoft C++ (MSVC) assemblies such as CRT, MFC, ATL or others, then the linker can generate a manifest automatically. The headers of MSVC libraries contain assembly information, and when the libraries are included in application code, this assembly information is used by the linker to form a manifest for the final binary. By default, the linker doesn't embed the manifest file inside the binary. Having a manifest as an external file may not work for all scenarios. For example, it's recommended that private assemblies have embedded manifests. In command line builds such as ones that use NMAKE to build code, you can use the [`/MANIFEST:EMBED`](./reference/manifest-create-side-by-side-assembly-manifest.md) linker option to embed the manifest. Alternatively, a manifest can be embedded using the manifest tool. For more information, see [Manifest generation at the command line](#manifest-generation-at-the-command-line). When you build in Visual Studio, a manifest can be embedded by setting a property for the manifest tool in the **Project Properties** dialog, as described in the next section. @@ -29,7 +29,7 @@ The build system in Visual Studio allows the manifest to be embedded in the fina 1. If the manifest embedded in the binary is the same as the manifest generated by the manifest tool, the build continues to the next build steps. -The manifest is embedded inside the final binary as a text resource. You can view it by opening the final binary as a file in Visual Studio. To ensure that the manifest points to the correct libraries, follow the steps described in [Understanding the dependencies of a Visual C++ application](../windows/understanding-the-dependencies-of-a-visual-cpp-application.md). Or, follow the suggestions described in the [Troubleshooting](troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md) article. +The manifest is embedded inside the final binary as a text resource. You can view it by opening the final binary as a file in Visual Studio. To ensure that the manifest points to the correct libraries, follow the steps described in [Understanding the dependencies of a Microsoft C++ application](../windows/understanding-the-dependencies-of-a-visual-cpp-application.md). Or, follow the suggestions described in the [Troubleshooting](troubleshooting-c-cpp-isolated-applications-and-side-by-side-assemblies.md) article. ## Manifest generation at the command line diff --git a/docs/build/vscpp-step-2-build.md b/docs/build/vscpp-step-2-build.md index e708ea80e02..174615c346b 100644 --- a/docs/build/vscpp-step-2-build.md +++ b/docs/build/vscpp-step-2-build.md @@ -1,6 +1,6 @@ --- title: Build and run a C++ console app project -description: "Build and run a Hello World console app in Visual C++" +description: "Build and run a Hello World console app in Microsoft C++" ms.custom: "mvc" ms.date: 06/28/2024 ms.topic: "tutorial" diff --git a/docs/build/walkthrough-compile-a-c-program-on-the-command-line.md b/docs/build/walkthrough-compile-a-c-program-on-the-command-line.md index 16e71d6fea8..ab7d92e680f 100644 --- a/docs/build/walkthrough-compile-a-c-program-on-the-command-line.md +++ b/docs/build/walkthrough-compile-a-c-program-on-the-command-line.md @@ -9,7 +9,7 @@ ms.topic: how-to --- # Walkthrough: Compile a C program on the command line -The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows desktop applications and mobile apps. Microsoft C/C++ (MSVC) is a C and C++ compiler that, in its latest versions, conforms to some of the latest C language standards, including C11 and C17. +The Visual Studio Build Tools include a C compiler that you can use to create everything from basic console programs to full Windows desktop applications and mobile apps. Microsoft C++ (MSVC) Build Tools contains a C and C++ compiler that, in its latest versions, conforms to some of the latest C language standards, including C11 and C17. This guide explains how to create a basic *Hello, World*-style C program by using a text editor, and then compile it on the command line. If you'd rather work in C++ on the command line, see [Walkthrough: Compiling a Native C++ Program on the Command Line](walkthrough-compiling-a-native-cpp-program-on-the-command-line.md). If you'd like to try the Visual Studio IDE instead of using the command line, see [Walkthrough: Working with Projects and Solutions (C++)](../ide/walkthrough-working-with-projects-and-solutions-cpp.md) or [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md). diff --git a/docs/build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md b/docs/build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md index 1bf1c0904fd..f450214e366 100644 --- a/docs/build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md +++ b/docs/build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md @@ -6,7 +6,7 @@ ms.assetid: cef41c88-faf9-439d-8423-25aa3f5674dd --- # Walkthrough: Compiling a C++/CLI Program on the Command Line -You can create Visual C++ programs that target the Common Language Runtime (CLR) and use the .NET Framework, and build them on the command line. Visual C++ supports the C++/CLI programming language, which has additional types and operators to target the .NET programming model. For general information about the C++/CLI language, see [.NET Programming with C++/CLI (Visual C++)](../dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md). +You can create Microsoft C++ programs that target the Common Language Runtime (CLR) and use the .NET Framework, and build them on the command line. Microsoft C++ supports the C++/CLI programming language, which has additional types and operators to target the .NET programming model. For general information about the C++/CLI language, see [.NET Programming with C++/CLI (Visual C++)](../dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md). In this walkthrough, you use a text editor to create a basic C++/CLI program, and then compile it on the command line. (You can use your own C++/CLI program instead of typing the one that's shown, or you can use a C++/CLI code sample from another help article. This technique is useful for building and testing small modules that have no UI elements.) @@ -18,7 +18,7 @@ You understand the fundamentals of the C++ language. The following steps show how to compile a C++/CLI console application that uses .NET Framework classes. -To enable compilation for C++/CLI, you must use the [/clr](reference/clr-common-language-runtime-compilation.md) compiler option. The MSVC compiler generates an .exe file that contains MSIL code—or mixed MSIL and native code—and links to the required .NET Framework libraries. +To enable compilation for C++/CLI, you must use the [/clr](reference/clr-common-language-runtime-compilation.md) compiler option. The Microsoft C++ (MSVC) compiler generates an .exe file that contains MSIL code—or mixed MSIL and native code—and links to the required .NET Framework libraries. ### To compile a C++/CLI application on the command line @@ -43,7 +43,7 @@ To enable compilation for C++/CLI, you must use the [/clr](reference/clr-common- 1. On the menu bar, choose **File** > **Save**. - You've created a Visual C++ source file that uses a .NET Framework class () in the namespace. + You've created a C++ source file that uses a .NET Framework class () in the namespace. 1. At the command prompt, enter `cl /clr basicclr.cpp`. The cl.exe compiler compiles the source code into an .obj file that contains MSIL, and then runs the linker to generate an executable program named basicclr.exe. diff --git a/docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md b/docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md index 5cd2502e96e..f2bf932a35e 100644 --- a/docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md +++ b/docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md @@ -22,7 +22,7 @@ Visual Studio is an *integrated development environment* (IDE). It supports a fu The Build Tools for Visual Studio installs only the command-line compilers, tools, and libraries you need to build C and C++ programs. It's perfect for build labs or classroom exercises and installs relatively quickly. To install only the command-line tools, look for Build Tools for Visual Studio on the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) page. -Before you can build a C or C++ program on the command line, verify that the tools are installed, and you can access them from the command line. Visual C++ has complex requirements for the command-line environment to find the tools, headers, and libraries it uses. **You can't use Visual C++ in a plain command prompt window** without doing some preparation. Fortunately, Visual C++ installs shortcuts for you to launch a developer command prompt that has the environment set up for command line builds. Unfortunately, the names of the developer command prompt shortcuts and where they're located are different in almost every version of Visual C++ and on different versions of Windows. Your first walkthrough task is finding the right one to use. +Before you can build a C or C++ program on the command line, verify that the tools are installed, and you can access them from the command line. Microsoft C++ (MSVC) has complex requirements for the command-line environment to find the tools, headers, and libraries it uses. **You can't use Microsoft C++ in a plain command prompt window** without doing some preparation. Fortunately, Microsoft C++ installs shortcuts for you to launch a developer command prompt that has the environment set up for command line builds. Unfortunately, the names of the developer command prompt shortcuts and where they're located are different in almost every version of Visual Studio and on different versions of Windows. Your first walkthrough task is finding the right one to use. > [!NOTE] > A developer command prompt shortcut automatically sets the correct paths for the compiler and tools, and for any required headers and libraries. You must set these environment values yourself if you use a regular **Command Prompt** window. For more information, see [Use the MSVC toolset from the command line](./building-on-the-command-line.md). We recommend you use a developer command prompt shortcut instead of building your own. @@ -31,11 +31,11 @@ Before you can build a C or C++ program on the command line, verify that the too 1. If you have installed Visual Studio 2017 or later on Windows 10 or later, open the Start menu and choose **All apps**. Scroll down and open the **Visual Studio** folder (not the Visual Studio application). Choose **Developer Command Prompt for VS** to open the command prompt window. - If you have installed Microsoft Visual C++ Build Tools 2015 on Windows 10 or later, open the **Start** menu and choose **All apps**. Scroll down and open the **Visual C++ Build Tools** folder. Choose **Visual C++ 2015 x86 Native Tools Command Prompt** to open the command prompt window. + If you have installed Microsoft Visual Studio Build Tools 2015 on Windows 10 or later, open the **Start** menu and choose **All apps**. Scroll down and open the **Visual Studio Build Tools** folder. Choose **x86 Native Tools Command Prompt** to open the command prompt window. You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window. -1. Next, verify that the Visual C++ developer command prompt is set up correctly. In the command prompt window, enter `cl` and verify that the output looks something like this: +1. Next, verify that the C++ developer command prompt is set up correctly. In the command prompt window, enter `cl` and verify that the output looks something like this: ```Output C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise>cl @@ -45,17 +45,17 @@ Before you can build a C or C++ program on the command line, verify that the too usage: cl [ option... ] filename... [ /link linkoption... ] ``` - There may be differences in the current directory or version numbers. These values depend on the version of Visual C++ and any updates installed. If the above output is similar to what you see, then you're ready to build C or C++ programs at the command line. + There may be differences in the current directory or version numbers. These values depend on the version of MSVC and any updates installed. If the above output is similar to what you see, then you're ready to build C or C++ programs at the command line. > [!NOTE] - > If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104 when you run the **`cl`** command, then either you are not using a developer command prompt, or something is wrong with your installation of Visual C++. You must fix this issue before you can continue. + > If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104 when you run the **`cl`** command, then either you are not using a developer command prompt, or something is wrong with your installation of MSVC. You must fix this issue before you can continue. - If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your Visual C++ installation may have a problem. Try reinstalling the Visual C++ component in Visual Studio, or reinstall the Microsoft Visual C++ Build Tools. Don't go on to the next section until the **`cl`** command works. For more information about installing and troubleshooting Visual C++, see [Install Visual Studio](/visualstudio/install/install-visual-studio). + If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your MSVC installation may have a problem. Try reinstalling the MSVC component in Visual Studio or Visual Studio Build Tools. Don't go on to the next section until the **`cl`** command works. For more information about installing and troubleshooting MSVC, see [Install Visual Studio](/visualstudio/install/install-visual-studio). > [!NOTE] > Depending on the version of Windows on the computer and the system security configuration, you might have to right-click to open the shortcut menu for the developer command prompt shortcut and then choose **Run as administrator** to successfully build and run the program that you create by following this walkthrough. -### Create a Visual C++ source file and compile it on the command line +### Create a C++ source file and compile it on the command line 1. In the developer command prompt window, enter `md c:\hello` to create a directory, and then enter `cd c:\hello` to change to that directory. This directory is where both your source file and the compiled program get created. @@ -70,7 +70,7 @@ Before you can build a C or C++ program on the command line, verify that the too using namespace std; int main() { - cout << "Hello, world, from Visual C++!" << endl; + cout << "Hello, world, from Microsoft C++!" << endl; } ``` @@ -130,7 +130,7 @@ Before you can build a C or C++ program on the command line, verify that the too The program displays this text and exits: ```Output - Hello, world, from Visual C++! + Hello, world, from Microsoft C++! ``` Congratulations, you've compiled and run a C++ program by using the command-line tools. diff --git a/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md b/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md index e777914ccdb..ac858bc073f 100644 --- a/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md +++ b/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md @@ -571,7 +571,7 @@ Press any key to dismiss the command window. Now that you've created a DLL and a client application, you can experiment. Try setting breakpoints in the code of the client app, and run the app in the debugger. See what happens when you step into a library call. Add other functions to the library, or write another client app that uses your DLL. -When you deploy your app, you must also deploy the DLLs it uses. The simplest way to make the DLLs that you build, or that you include from third parties, available is to put them in the same directory as your app. It's known as *app-local deployment*. For more information about deployment, see [Deployment in Visual C++](../windows/deployment-in-visual-cpp.md). +When you deploy your app, you must also deploy the DLLs it uses. The simplest way to make the DLLs that you build, or that you include from third parties, available is to put them in the same directory as your app. It's known as *app-local deployment*. For more information about deployment, see [Deployment in Microsoft C++](../windows/deployment-in-visual-cpp.md). ## See also diff --git a/docs/build/walkthrough-header-units.md b/docs/build/walkthrough-header-units.md index 2a21f566b61..4e7de18c974 100644 --- a/docs/build/walkthrough-header-units.md +++ b/docs/build/walkthrough-header-units.md @@ -1,6 +1,6 @@ --- description: "Learn more about C++ header units. Convert a header file to a header unit using Visual Studio 2022." -title: "Walkthrough: Build and import header units in Visual C++ projects" +title: "Walkthrough: Build and import header units in Microsoft C++ projects" ms.date: 09/29/2022 ms.custom: "conceptual" author: "tylermsft" @@ -9,7 +9,7 @@ helpviewer_keywords: ["import", "header unit", "ifc"] monikerRange: '>=msvc-160' --- -# Walkthrough: Build and import header units in Microsoft Visual C++ +# Walkthrough: Build and import header units in Microsoft C++ This article is about building and importing header units with Visual Studio 2022. To learn how to import C++ standard library headers as header units, see [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md). For an even faster and more robust way to import the standard library, see [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md). diff --git a/docs/build/walkthrough-import-stl-header-units.md b/docs/build/walkthrough-import-stl-header-units.md index 3c2fd2d7e57..1f50e2518f9 100644 --- a/docs/build/walkthrough-import-stl-header-units.md +++ b/docs/build/walkthrough-import-stl-header-units.md @@ -221,5 +221,5 @@ The main consideration for whether to use this approach is the balance between c [Compare header units, modules, and precompiled headers](compare-inclusion-methods.md)\ [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\ -[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)\ +[Walkthrough: Build and import header units in your Microsoft C++ projects](walkthrough-header-units.md)\ [`/translateInclude`](./reference/translateinclude.md) diff --git a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md index 2e210281852..b96564b5d3c 100644 --- a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md +++ b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md @@ -4,9 +4,9 @@ description: "A walkthrough that shows how to create a command-line MSBuild C++ ms.date: 10/08/2020 helpviewer_keywords: ["MSBuild (C++), walkthrough: create a project"] --- -# Walkthrough: Using MSBuild to Create a Visual C++ Project +# Walkthrough: Using MSBuild to Create a Visual Studio C++ Project -This walkthrough demonstrates how to use MSBuild in a command prompt to build a Visual Studio C++ project. You'll learn how to create an XML-based *`.vcxproj`* project file for a Visual C++ console application. After building the project, you'll learn how to customize the build process. +This walkthrough demonstrates how to use MSBuild in a command prompt to build a Visual Studio C++ project. You'll learn how to create an XML-based *`.vcxproj`* project file for a C++ console application. After building the project, you'll learn how to customize the build process. > [!IMPORTANT] > Don't use this approach if you intend to edit the project file later by using the Visual Studio IDE. If you create a *`.vcxproj`* file manually, the Visual Studio IDE might not be able to edit or load it, especially if the project uses wildcards in project items. For more information, see [`.vcxproj` and `.props` file structure](./reference/vcxproj-file-structure.md) and [`.vcxproj` files and wildcards](./reference/vcxproj-files-and-wildcards.md). @@ -78,7 +78,7 @@ In this walkthrough, you'll create a project that has a source file and a header An MSBuild project file is an XML file that contains a project root element (``). In the example project you'll build, the `` element contains seven child elements: - Three item group tags (``) that specify project configuration and platform, source file name, and header file name. -- Three import tags (``) that specify the location of Microsoft Visual C++ settings. +- Three import tags (``) that specify the location of Microsoft C++ settings. - A property group tag (``) that specifies project settings. ### To create the MSBuild project file @@ -249,7 +249,7 @@ At the command prompt, enter this command to use the 64-bit tools to build your ### Using MSBuild with a different toolset -If you have the toolsets and libraries for other versions of Visual C++ installed, MSBuild can build applications for either the current Visual C++ version or for the other installed versions. For example, if you have installed Visual Studio 2012, to specify the Visual C++ 11.0 toolset for Windows XP, add this property group element to the *`Myproject.vcxproj`* project file after the *`Microsoft.Cpp.props`* file `` element: +If you have the toolsets and libraries for other versions of Microsoft C++ (MSVC) installed, MSBuild can build applications for either the current MSVC version or for the other installed versions. For example, if you have installed Visual Studio 2012, to specify the Visual C++ 11.0 toolset for Windows XP, add this property group element to the *`Myproject.vcxproj`* project file after the *`Microsoft.Cpp.props`* file `` element: ```xml diff --git a/docs/build/why-floating-point-numbers-may-lose-precision.md b/docs/build/why-floating-point-numbers-may-lose-precision.md index 7fc2eb91e9a..45605f0aa43 100644 --- a/docs/build/why-floating-point-numbers-may-lose-precision.md +++ b/docs/build/why-floating-point-numbers-may-lose-precision.md @@ -17,7 +17,7 @@ This behavior is the result of one of the following: To resolve the behavior, most programmers either ensure that the value is greater or less than what is needed, or they get and use a Binary Coded Decimal (BCD) library that will maintain the precision. -Binary representation of floating-point values affects the precision and accuracy of floating-point calculations. Microsoft Visual C++ uses [IEEE floating-point format](ieee-floating-point-representation.md). +Binary representation of floating-point values affects the precision and accuracy of floating-point calculations. Microsoft C++ uses [IEEE floating-point format](ieee-floating-point-representation.md). ## Example diff --git a/docs/build/working-with-project-properties.md b/docs/build/working-with-project-properties.md index 3540aad87db..b6ca518f4c8 100644 --- a/docs/build/working-with-project-properties.md +++ b/docs/build/working-with-project-properties.md @@ -41,7 +41,7 @@ For more information about setting properties for a Debug build, see: - [Project settings for a C++ debug configuration](/visualstudio/debugger/project-settings-for-a-cpp-debug-configuration) - [Debugger Settings and Preparation](/visualstudio/debugger/debugger-settings-and-preparation) -- [Debugging Preparation: Visual C++ Project Types](/visualstudio/debugger/debugging-preparation-visual-cpp-project-types) +- [Debugging Preparation: Microsoft C++ Project Types](/visualstudio/debugger/debugging-preparation-visual-cpp-project-types) - [Specify symbol (.pdb) and source files in the Visual Studio debugger](/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger) ## C++ compiler and linker options diff --git a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md index f2c9b0519be..4cc0476df39 100644 --- a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md +++ b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md @@ -1,11 +1,11 @@ --- -title: "Cloud and Web Programming in Visual C++" -description: "Learn more about: Cloud and Web Programming in Visual C++" +title: "Cloud and Web Programming in Microsoft C++" +description: "Learn more about: Cloud and Web Programming in Microsoft C++" ms.date: "05/14/2019" ms.topic: "overview" ms.custom: intro-overview --- -# Cloud and Web Programming in Visual C++ +# Cloud and Web Programming in Microsoft C++ In C++, you have several options for connecting to the web and the cloud. diff --git a/docs/code-quality/build-reliable-secure-programs.md b/docs/code-quality/build-reliable-secure-programs.md index 94181eb5c90..2f31f19fc15 100644 --- a/docs/code-quality/build-reliable-secure-programs.md +++ b/docs/code-quality/build-reliable-secure-programs.md @@ -114,8 +114,8 @@ Tests that do deeper verification and take longer to run, such as static analysi **Key tools** Be aware of and use the following: - [Code analysis documentation - C++ and .NET](/visualstudio/code-quality/) -- [`/analyze` - Visual C++ compiler](../build/reference/analyze-code-analysis.md) -- [`/W4` and `/WX` - Visual C++ compiler](../build/reference/compiler-option-warning-level.md) +- [`/analyze` - Microsoft C++ compiler](../build/reference/analyze-code-analysis.md) +- [`/W4` and `/WX` - Microsoft C++ compiler](../build/reference/compiler-option-warning-level.md) - [Use the C++ Core Guidelines Checkers](using-the-cpp-core-guidelines-checkers.md) - [CodeQL | GitHub](https://codeql.github.com/) - [Binskim user guide | GitHub](https://github.com/microsoft/binskim/blob/main/docs/UserGuide.md) @@ -123,7 +123,7 @@ Tests that do deeper verification and take longer to run, such as static analysi Notes: -- `/analyze` enables static analysis of C++ code at compile time to identify critical security and reliability code vulnerabilities. It should be enabled throughout a C++ program's entire development timeline. Start by enabling at least the "Microsoft Native Recommended" by default as a minimum baseline. Then consult the documentation for how to specify more rules, especially the C++ Core Guidelines rules, as required by your engineering policies. The source code Static Analysis capability is available in both the Visual C++ IDE and in the command-line Build Tools. +- `/analyze` enables static analysis of C++ code at compile time to identify critical security and reliability code vulnerabilities. It should be enabled throughout a C++ program's entire development timeline. Start by enabling at least the "Microsoft Native Recommended" by default as a minimum baseline. Then consult the documentation for how to specify more rules, especially the C++ Core Guidelines rules, as required by your engineering policies. The source code Static Analysis capability is available in both the Visual Studio IDE and in the command-line Build Tools. - `/W4` and `/WX` should be enabled wherever possible, to ensure you compile your code cleanly at high warning levels (`W4`) and treat warnings as errors that must be fixed (`WX`). These options enable finding uninitialized data errors that other static analysis tools can't check, because the errors only become visible after the compiler back-end performs interprocedural analysis and inlining. - BinSkim binary analysis ensures that projects enable a broad range of security features. BinSkim generates PDBs and other outputs that make it easier to verify chain-of-custody and to respond efficiently to security issues. Microsoft recommends running the BinSkim tool to analyze all executable binaries (`.sys`, `.dll` or `.exe`) produced for or consumed by your programs. The BinSkim User Guide includes a list of supported security standards. Microsoft recommends that you fix all issues reported as "errors" by the BinSkim tool. Issues reported as "warnings" should be evaluated selectively, because resolving them can have performance implications or might not be necessary. @@ -249,14 +249,14 @@ Binaries shouldn't link to insecure libraries and dependencies. Development team Compilation should enable strong code provenance guarantees to help detect and prevent introduction of backdoors and other malicious code. The resulting data, also critical to debugging and investigation, should be archived for all software releases to drive efficient security response if they're compromised. The following compiler switches generate information that is critical to a security response: -- [`/ZH:SHA_SHA256` in Visual C++](../build/reference/zh.md) - Ensures that a cryptographically secure algorithm is used to generate all PDB source file hashes. -- [`/Zi`, `/ZI` (Debug Information Format) in Visual C++](../build/reference/z7-zi-zi-debug-information-format.md) - In addition to publishing stripped symbols for collecting crash data and other public use scenarios, ensure that builds produce and archive private PDBs for all released binaries. Binary analysis tools require full symbols to verify whether many security mitigations were enabled at compile-time. Private symbols are critical in security response, and lower debugging and investigation costs when engineers are racing to assess and limit damage when an exploit happens. -- [`/SOURCELINK` in Visual C++ Linker - Include Sourcelink file in PDB](../build/reference/sourcelink.md): Source link is a language- and source-control agnostic system providing source debugging for binaries. Source debugging greatly increases the efficiency the range of prerelease security validations and post-release incident response. +- [`/ZH:SHA_SHA256` in Microsoft C++](../build/reference/zh.md) - Ensures that a cryptographically secure algorithm is used to generate all PDB source file hashes. +- [`/Zi`, `/ZI` (Debug Information Format) in Microsoft C++](../build/reference/z7-zi-zi-debug-information-format.md) - In addition to publishing stripped symbols for collecting crash data and other public use scenarios, ensure that builds produce and archive private PDBs for all released binaries. Binary analysis tools require full symbols to verify whether many security mitigations were enabled at compile-time. Private symbols are critical in security response, and lower debugging and investigation costs when engineers are racing to assess and limit damage when an exploit happens. +- [`/SOURCELINK` in Microsoft C++ Linker - Include Sourcelink file in PDB](../build/reference/sourcelink.md): Source link is a language- and source-control agnostic system providing source debugging for binaries. Source debugging greatly increases the efficiency the range of prerelease security validations and post-release incident response. **Enable compiler errors to prevent issues at code authoring time** Compilation should enable security-relevant compiler checks as breaking errors, for example: -- [`/sdl` in Visual C++ - Enable additional security checks](https://aka.ms/AdditionalSecurityChecks) elevates many security-relevant warnings into errors and enables advanced secure code-generation features. +- [`/sdl` in Microsoft C++ - Enable additional security checks](https://aka.ms/AdditionalSecurityChecks) elevates many security-relevant warnings into errors and enables advanced secure code-generation features. - [BinSkim BA2007.EnableCriticalCompilerWarnings | GitHub](https://github.com/microsoft/binskim/blob/main/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs) maintains a list of Microsoft-recommended C/C++ compiler warnings that should always be enabled and elevated to errors. **Mark binaries as compatible with OS runtime security mitigations** @@ -401,7 +401,7 @@ Modify your build(s) to support continuous creation of executables that use LibF **Summary** -Within the scope of Microsoft Visual C++ on Windows, Microsoft recommends: +Within the scope of Microsoft C++ on Windows, Microsoft recommends: - Prefer TypeScript, JavaScript, and ASP.NET for web applications. - Don't write web extensions in C++. Microsoft has deprecated ActiveX. diff --git a/docs/code-quality/code-analysis-for-c-cpp-overview.md b/docs/code-quality/code-analysis-for-c-cpp-overview.md index 33c4a8e91e1..fffa6d3ad8b 100644 --- a/docs/code-quality/code-analysis-for-c-cpp-overview.md +++ b/docs/code-quality/code-analysis-for-c-cpp-overview.md @@ -20,7 +20,7 @@ ms.assetid: 81f0c9e8-f471-4de5-aac4-99db336a8809 --- # Code analysis for C/C++ overview -The C/C++ Code Analysis tool provides information about possible defects in your C/C++ source code. Common coding errors reported by the tool include buffer overruns, uninitialized memory, null pointer dereferences, and memory and resource leaks. The tool can also run checks against the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines). +The Microsoft C++ Code Analysis tool provides information about possible defects in your C/C++ source code. Common coding errors reported by the tool include buffer overruns, uninitialized memory, null pointer dereferences, and memory and resource leaks. The tool can also run checks against the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines). ## IDE (integrated development environment) integration diff --git a/docs/code-quality/using-the-cpp-core-guidelines-checkers.md b/docs/code-quality/using-the-cpp-core-guidelines-checkers.md index fefa3144ce2..34cdcc545ff 100644 --- a/docs/code-quality/using-the-cpp-core-guidelines-checkers.md +++ b/docs/code-quality/using-the-cpp-core-guidelines-checkers.md @@ -8,7 +8,7 @@ dev_langs: --- # Use the C++ Core Guidelines checkers -The C++ Core Guidelines are a portable set of guidelines, rules, and best practices about coding in C++ created by C++ experts and designers. Visual Studio currently supports a subset of these rules as part of its code analysis tools for C++. The core guideline checkers are installed by default in Visual Studio 2017 and Visual Studio 2019. They're [available as a NuGet package for Visual Studio 2015](#vs2015_corecheck). +The C++ Core Guidelines are a portable set of guidelines, rules, and best practices about coding in C++ created by C++ experts and designers. Visual Studio currently supports a subset of these rules as part of its Microsoft C++ Code Analysis tools. The core guideline checkers are installed by default in Visual Studio 2017 and Visual Studio 2019. They're [available as a NuGet package for Visual Studio 2015](#vs2015_corecheck). ## The C++ Core Guidelines Project diff --git a/docs/embedded/download-and-install-the-embedded-tooling.md b/docs/embedded/download-and-install-the-embedded-tooling.md index 1fe6ea96d53..e16dae943ea 100644 --- a/docs/embedded/download-and-install-the-embedded-tooling.md +++ b/docs/embedded/download-and-install-the-embedded-tooling.md @@ -25,7 +25,7 @@ To use the embedded development tools in Visual Studio, you must install the req 1. Open the Visual Studio Installer. In Visual Studio Installer, choose **Modify** next to your installation of Visual Studio, and then select the **Workloads** tab. Scroll down to **Other toolsets** and select the **Linux and embedded development with C++** workload. - ![Screenshot showing the Visual C++ for Linux Development workload item in Visual Studio Installer.](media/linux-and-embedded-workload.png) + ![Screenshot showing the Microsoft C++ for Linux Development workload item in Visual Studio Installer.](media/linux-and-embedded-workload.png) 1. Choose **Modify** to continue with the installation. diff --git a/docs/get-started/toc.yml b/docs/get-started/toc.yml index bc7a83fb976..32d38ad40ef 100644 --- a/docs/get-started/toc.yml +++ b/docs/get-started/toc.yml @@ -1,5 +1,5 @@ items: -- name: Get started with Visual C++ +- name: Get started with Microsoft C++ expanded: true items: - name: Install C++ support in Visual Studio diff --git a/docs/get-started/tutorial-console-cpp.md b/docs/get-started/tutorial-console-cpp.md index db968eefaa5..608ab706e06 100644 --- a/docs/get-started/tutorial-console-cpp.md +++ b/docs/get-started/tutorial-console-cpp.md @@ -1,6 +1,6 @@ --- title: "Create a console calculator in C++" -description: "Create a Hello World console app and a calculator app in Visual C++" +description: "Create a Hello World console app and a calculator app in Visual Studio C++" ms.custom: "acquisition, mvc" ms.date: 10/08/2024 ms.topic: "tutorial" diff --git a/docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md b/docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md index 45a30a66416..5f115d743cc 100644 --- a/docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md +++ b/docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md @@ -16,7 +16,7 @@ If you haven't installed Visual Studio yet, now is the time. For download links These walkthroughs assume that you've installed Visual Studio and the C++ components required for Windows Desktop development. We also assume you understand the fundamentals of the C++ language. If you need to learn C++, there are many books and web resources available. One good place to start is the [Get Started](https://isocpp.org/get-started) page of the Standard C++ Foundation website. -In general, we highly recommend that you use the latest version of Visual Studio even if you need to compile your code using an earlier version of the compiler toolset. For more information, see [Use native multi-targeting in Visual Studio to build old projects](../porting/use-native-multi-targeting.md). +In general, we highly recommend that you use the latest version of Visual Studio even if you need to compile your code using an earlier version of the Microsoft C++ (MSVC) Build Tools. For more information, see [Use native multi-targeting in Visual Studio to build old projects](../porting/use-native-multi-targeting.md). Once your Visual Studio installation is complete, you are ready to continue. @@ -36,7 +36,7 @@ To get started using the Visual Studio IDE to build C++ apps, work through each ## Next steps -Once you've completed these walkthroughs, you're ready to start building your own projects. For more information and resources for C++ development, see [Visual C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md). +Once you've completed these walkthroughs, you're ready to start building your own projects. For more information and resources for C++ development, see [Microsoft C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md). ## See also diff --git a/docs/ide/writing-and-refactoring-code-cpp.md b/docs/ide/writing-and-refactoring-code-cpp.md index 72dc71d8b4f..cfb3dbfdead 100644 --- a/docs/ide/writing-and-refactoring-code-cpp.md +++ b/docs/ide/writing-and-refactoring-code-cpp.md @@ -22,7 +22,7 @@ search for "IntelliSense" in **Quick Launch** (Ctrl + Q) and choose the **Text E The **Member List Filter Mode** option controls what kinds of IntelliSense autocomplete suggestions you see. By default, it's set to **Fuzzy**. In a fuzzy search, if you have a symbol called *MyAwesomeClass*, you can type "MAC" and find the class in your autocomplete suggestions. The fuzzy algorithm sets a minimum threshold that symbols must meet to show up in the list. **Smart** filtering displays all symbols containing substrings that match what you typed. **Prefix** filtering searches for strings that begin with what you typed. -For more information about C++ IntelliSense, see [Visual C++ IntelliSense](/visualstudio/ide/visual-cpp-intellisense) and [Configure a C++ project for IntelliSense](/visualstudio/ide/visual-cpp-intellisense-configuration). +For more information about C++ IntelliSense, see [Visual Studio C++ IntelliSense](/visualstudio/ide/visual-cpp-intellisense) and [Configure a C++ project for IntelliSense](/visualstudio/ide/visual-cpp-intellisense-configuration). ## IntelliCode diff --git a/docs/intrinsics/arm-intrinsics.md b/docs/intrinsics/arm-intrinsics.md index f2a248f9a97..bde0f7c5627 100644 --- a/docs/intrinsics/arm-intrinsics.md +++ b/docs/intrinsics/arm-intrinsics.md @@ -7,7 +7,7 @@ helpviewer_keywords: ["cl.exe compiler, ARM intrinsics", "intrinsics, ARM", "__c --- # ARM intrinsics -The Microsoft C++ compiler (MSVC) makes the following intrinsics available on the ARM architecture. For more information about ARM, see the Architecture and Software Development Tools sections of the [ARM Developer Documentation](https://developer.arm.com/docs) website. +The Microsoft C++ (MSVC) compiler makes the following intrinsics available on the ARM architecture. For more information about ARM, see the Architecture and Software Development Tools sections of the [ARM Developer Documentation](https://developer.arm.com/docs) website. ## NEON diff --git a/docs/intrinsics/arm64-intrinsics.md b/docs/intrinsics/arm64-intrinsics.md index 8300ceea360..c610e426be3 100644 --- a/docs/intrinsics/arm64-intrinsics.md +++ b/docs/intrinsics/arm64-intrinsics.md @@ -9,7 +9,7 @@ ms.date: "11/14/2019" --- # ARM64 intrinsics -The Microsoft C++ compiler (MSVC) makes the following intrinsics available on the ARM64 architecture. For more information about ARM, see the Architecture and Software Development Tools sections of the [ARM Developer Documentation](https://developer.arm.com/docs) website. +The Microsoft C++ (MSVC) compiler makes the following intrinsics available on the ARM64 architecture. For more information about ARM, see the Architecture and Software Development Tools sections of the [ARM Developer Documentation](https://developer.arm.com/docs) website. ## NEON diff --git a/docs/intrinsics/compiler-intrinsics.md b/docs/intrinsics/compiler-intrinsics.md index ea886301346..381e8610042 100644 --- a/docs/intrinsics/compiler-intrinsics.md +++ b/docs/intrinsics/compiler-intrinsics.md @@ -13,7 +13,7 @@ Most functions are contained in libraries, but some functions are built in (that If a function is an intrinsic, the code for that function is usually inserted inline, avoiding the overhead of a function call and allowing highly efficient machine instructions to be emitted for that function. An intrinsic is often faster than the equivalent inline assembly, because the optimizer has a built-in knowledge of how many intrinsics behave, so some optimizations can be available that are not available when inline assembly is used. Also, the optimizer can expand the intrinsic differently, align buffers differently, or make other adjustments depending on the context and arguments of the call. -The use of intrinsics affects the portability of code, because intrinsics that are available in Visual C++ might not be available if the code is compiled with other compilers and some intrinsics that might be available for some target architectures are not available for all architectures. However, intrinsics are usually more portable than inline assembly. The intrinsics are required on 64-bit architectures where inline assembly is not supported. +The use of intrinsics affects the portability of code, because intrinsics that are available in Microsoft C++ might not be available if the code is compiled with other compilers and some intrinsics that might be available for some target architectures are not available for all architectures. However, intrinsics are usually more portable than inline assembly. The intrinsics are required on 64-bit architectures where inline assembly is not supported. Some intrinsics, such as **`__assume`** and `__ReadWriteBarrier`, provide information to the compiler, which affects the behavior of the optimizer. diff --git a/docs/overview/compiler-versions.md b/docs/overview/compiler-versions.md index b167daf2351..f1502c60088 100644 --- a/docs/overview/compiler-versions.md +++ b/docs/overview/compiler-versions.md @@ -1,14 +1,14 @@ --- -description: "Learn more about Microsoft Visual C++ compiler versioning." -title: "Microsoft Visual C++ compiler versioning (Visual C++)" +description: "Learn more about Microsoft C++ compiler versioning." +title: "Microsoft C++ (MSVC) compiler versioning" ms.date: 02/12/2025 ms.service: "visual-cpp" ms.subservice: "tools" helpviewer_keywords: ["Visual C++, platforms supported", "platforms [C++]"] --- -# Microsoft Visual C++ compiler versioning +# Microsoft C++ (MSVC) compiler versioning -The Microsoft Visual C++ compiler version consists of four fields: +The Microsoft C++ (MSVC) compiler version consists of four fields: M - major version (two digits)\ N - minor version (two digits)\ @@ -33,9 +33,9 @@ The macros reflect these values like this: - `_MSC_BUILD` (the revision) is 0. >[!Note] ->Visual Studio 2019 16.8 and 16.9 share the same major and minor versions, and so have the same value for `_MSC_VER`. As do Visual Studio 2019 16.10 and 16.11. To distinguish them, use `_MSC_FULL_VER` as described in [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017). +>Visual Studio 2019 versions 16.8 and 16.9 share the same major and minor versions, and so have the same value for `_MSC_VER`. As do Visual Studio 2019 versions 16.10 and 16.11. To distinguish them, use `_MSC_FULL_VER` as described in [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017). -## A brief history of Visual C++ compiler versioning +## A brief history of Microsoft C++ compiler versioning ### Visual Studio 6.0 through Visual Studio 2015 (14.0) @@ -45,20 +45,26 @@ The macros reflect these values like this: >[!Note] > Visual Studio .NET 2003 was considered a minor release. -### Visual Studio 2017 and later +### Visual Studio 2017 to Visual Studio 2022 - For major releases, the minor version increases by 10. - For minor releases, the minor version increases by 1 starting with Visual Studio 2017 version 15.3. +### Visual Studio 2026 and later + +- The compiler minor version is no longer incremented in relation to Visual Studio version updates. +- The minor version increments by 1 with each new MSVC release. +- Not every new Visual Studio version will ship a new MSVC compiler version. + ### Service releases starting with Visual Studio 2017 Servicing releases are distinguished by `_MSC_FULL_VER`. The build field (the BBBBB in the MMNNBBBBB version number) typically increases by 1. -For example, two cases where `_MSC_FULL_VER` is useful is to distinguish Visual Studio 2019 16.8 from 16.9, and Visual Studio 2019 16.10 from 16.11. That's because those versions share the same major and minor versions, and so have the same value for `_MSC_VER`. +For example, two cases where `_MSC_FULL_VER` is useful is to distinguish Visual Studio 2019 version 16.8 from 16.9, and Visual Studio 2019 version 16.10 from 16.11. That's because those versions share the same major and minor versions, and so have the same value for `_MSC_VER`. To distinguish these versions, use `_MSC_FULL_VER`.\ -The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.8 is 192829333.\ -The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.9 is 192829910. +The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.8 is 192829333.\ +The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.9 is 192829910. ## Version macros @@ -71,17 +77,17 @@ R - revision version **[`_MSC_VER`](../preprocessor/predefined-macros.md)** distinguishes between major and minor releases. It has the form: MMNN. -**[`_MSC_FULL_VER`](../preprocessor/predefined-macros.md)** represents the major, minor, and build version of the compiler. It has the form: MMNNBBBBB. Use it to distinguish between different versions of the compiler, including servicing releases. For more information about Visual Studio 2019 16.8, 16.9, 16.10 and 16.11, see [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017). +**[`_MSC_FULL_VER`](../preprocessor/predefined-macros.md)** represents the major, minor, and build version of the compiler. It has the form: MMNNBBBBB. Use it to distinguish between different versions of the compiler, including servicing releases. For more information about Visual Studio 2019 versions 16.8, 16.9, 16.10 and 16.11, see [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017). **[`_MSC_BUILD`](../preprocessor/predefined-macros.md)** represents the build version of the compiler. It has the form: R. Use it to distinguish between servicing releases. When the major version changed between Visual Studio 2013 and Visual Studio 2015, `_MSC_VER` reflected the change by going from 1800 to 1900. -An example of a minor change is from Visual Studio 2022 17.1 to Visual Studio 2022 17.2. In that case, `_MSC_VER` changed from 1931 to 1932. +An example of a minor change is from Visual Studio 2022 version 17.1 to Visual Studio 2022 version 17.2. In that case, `_MSC_VER` changed from 1931 to 1932. -The following table lists the Visual Studio version corresponding to each Visual C++ compiler (`_MSC_VER`) and MSVC toolset release: +The following table lists the Visual Studio version corresponding to each Microsoft C++ compiler (`_MSC_VER`) and MSVC Build Tools release: -| Visual Studio version | `_MSC_VER` | MSVC toolset version | +| Visual Studio version | `_MSC_VER` | MSVC Build Tools version | |--|--|--| | Visual Studio 6.0 | 1200 | 6.0 | | Visual Studio .NET 2002 (7.0) | 1300 | 7.0 | @@ -125,9 +131,9 @@ The following table lists the Visual Studio version corresponding to each Visual | Visual Studio 2022 version 17.13 | 1943 | 14.43 | | Visual Studio 2022 version 17.14 | 1944 | 14.44 | -a Visual Studio 2019 16.8 and 16.9 share the same major and minor versions (and so have the same value for `_MSC_VER`). To distinguish them, use `_MSC_FULL_VER`. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.8 is 192829333. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.9 is 192829910. +a Visual Studio 2019 versions 16.8 and 16.9 share the same major and minor versions (and so have the same value for `_MSC_VER`). To distinguish them, use `_MSC_FULL_VER`. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.8 is 192829333. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.9 is 192829910. -b Visual Studio 2019 16.10 and 16.11 share the same major and minor versions (and so have the same value for `_MSC_VER`). To distinguish them, use `_MSC_FULL_VER`. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.10 is 192929917. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.11 is 192930129. +b Visual Studio 2019 versions 16.10 and 16.11 share the same major and minor versions (and so have the same value for `_MSC_VER`). To distinguish them, use `_MSC_FULL_VER`. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.10 is 192929917. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 version 16.11 is 192930129. ## See also diff --git a/docs/overview/cpp-conformance-improvements-2019.md b/docs/overview/cpp-conformance-improvements-2019.md index e3b390b72fe..17c1f7f7a39 100644 --- a/docs/overview/cpp-conformance-improvements-2019.md +++ b/docs/overview/cpp-conformance-improvements-2019.md @@ -7,7 +7,7 @@ ms.subservice: "cpp-lang" --- # C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2019 -Microsoft C/C++ in Visual Studio (MSVC) makes conformance improvements and bug fixes in every release. This article lists the improvements by major release, then by version. To jump directly to the changes for a specific version, use the list below **In this article**. +Microsoft C++ (MSVC) Build Tools in Visual Studio makes conformance improvements and bug fixes in every release. This article lists the improvements by major release, then by version. To jump directly to the changes for a specific version, use the list below **In this article**. This document lists the changes in Visual Studio 2019. For a guide to the changes in Visual Studio 2022, see [C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md). For changes in Visual Studio 2017, see [C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md). For a complete list of previous conformance improvements, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). diff --git a/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md b/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md index 5fff09d04d6..813d310ea09 100644 --- a/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md +++ b/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md @@ -1,5 +1,5 @@ --- -title: "How to report a problem with the Microsoft C++ toolset" +title: "How to report a problem with the Microsoft C++ Build Tools" description: How to create a good problem report and repro information for the Microsoft C++ toolset. ms.date: "09/24/2019" ms.service: "visual-cpp" @@ -7,7 +7,7 @@ ms.subservice: "ide" author: "tylermsft" ms.author: "twhitney" --- -# How to report a problem with the Microsoft C++ toolset or documentation +# How to report a problem with the Microsoft C++ Build Tools or documentation If you find problems in the Microsoft C++ compiler (MSVC), the linker, or other tools and libraries, we want to know about them. When the issue is in our documentation, we want to know about that, too. @@ -382,7 +382,7 @@ For issues with the C++ compiler, linker, and other tools and libraries, first s > Information in the initial Developer Community report will always be public. If this is a concern, see the next section about [Reports and privacy](#reports-and-privacy). > [!TIP] -> For other kinds of problems you might find in Visual Studio that are unrelated to the C++ toolset (For example, UI issues, broken IDE functionality, or general crashes), use the **Report a Problem** tool in the IDE. This is the best choice, due to its screenshot capabilities and its ability to record UI actions that lead to the problem you found. These kinds of errors can also be looked up on the Visual Studio [Developer Community](https://aka.ms/feedback/report?space=8) site. For more information, see [How to report a problem with Visual Studio](/visualstudio/ide/how-to-report-a-problem-with-visual-studio). +> For other kinds of problems you might find in Visual Studio that are unrelated to the Microsoft C++ Build Tools (For example, UI issues, broken IDE functionality, or general crashes), use the **Report a Problem** tool in the IDE. This is the best choice, due to its screenshot capabilities and its ability to record UI actions that lead to the problem you found. These kinds of errors can also be looked up on the Visual Studio [Developer Community](https://aka.ms/feedback/report?space=8) site. For more information, see [How to report a problem with Visual Studio](/visualstudio/ide/how-to-report-a-problem-with-visual-studio). ### Reports and privacy diff --git a/docs/overview/supported-platforms-visual-cpp.md b/docs/overview/supported-platforms-visual-cpp.md index 1e369fd7e73..2b52a32f94e 100644 --- a/docs/overview/supported-platforms-visual-cpp.md +++ b/docs/overview/supported-platforms-visual-cpp.md @@ -1,12 +1,12 @@ --- -description: "Learn more about: Supported Platforms (Visual C++)" -title: "Supported Platforms (Visual C++)" +description: "Learn more about: Supported Platforms (Microsoft C++)" +title: "Supported Platforms (Microsoft C++)" ms.date: 10/22/2025 ms.service: "visual-cpp" ms.subservice: "tools" helpviewer_keywords: ["Visual C++, platforms supported", "platforms [C++]"] --- -# Supported platforms (Visual C++) +# Supported platforms (Microsoft C++) Apps built by using Visual Studio can be targeted to various platforms. @@ -48,9 +48,9 @@ Support for targeting 32-bit ARM was permanently removed in VS 2026 18.0. f You can install the **Linux development with C++** workload in the installer for Visual Studio 2017 and later to target Linux platforms. For instructions, see [Download, install, and setup the Linux Workload](../linux/download-install-and-setup-the-linux-development-workload.md). This toolset compiles your executable on the target machine, so you can build for any supported architecture. -For information about how to set the target platform configuration, see [How to: Configure Visual C++ projects to target 64-bit, x64 platforms](../build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md). +For information about how to set the target platform configuration, see [How to: Configure Microsoft C++ projects to target 64-bit, x64 platforms](../build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md). ## See also -[Visual C++ tools and features in Visual Studio editions](visual-cpp-tools-and-features-in-visual-studio-editions.md)\ +[Microsoft C++ tools and features in Visual Studio editions](visual-cpp-tools-and-features-in-visual-studio-editions.md)\ [Getting Started](/visualstudio/ide/getting-started-with-cpp-in-visual-studio) diff --git a/docs/overview/toc.yml b/docs/overview/toc.yml index 66d418921eb..8c34abe851e 100644 --- a/docs/overview/toc.yml +++ b/docs/overview/toc.yml @@ -32,7 +32,7 @@ items: href: ../overview/visual-cpp-samples.md - name: Help and community href: ../overview/visual-cpp-help-and-community.md - - name: How to report a problem with the Visual C++ toolset + - name: How to report a problem with the Microsoft C++ Build Tools href: ../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md - name: Visual Studio C++ Tutorials expanded: false diff --git a/docs/overview/visual-cpp-in-visual-studio.md b/docs/overview/visual-cpp-in-visual-studio.md index 30012947cad..111b4036a69 100644 --- a/docs/overview/visual-cpp-in-visual-studio.md +++ b/docs/overview/visual-cpp-in-visual-studio.md @@ -44,9 +44,9 @@ helpviewer_keywords: ["Visual C++, home page"] :::moniker-end -Microsoft Visual C++ (MSVC) refers to the C++, C, and assembly language development tools and libraries available as part of Visual Studio on Windows. These tools and libraries let you create native Windows desktop and server applications, Universal Windows Platform (UWP) apps, or managed apps and libraries that use the .NET Framework. Create cross-platform libraries and apps that run on Windows, Linux, Android, and iOS. You can use MSVC to write anything from simple console apps to the most sophisticated and complex apps for Windows desktop. Write device drivers and operating system components or cross-platform games for mobile devices. Target anything from the smallest IoT devices to multi-server high performance computing in the Azure cloud. +Microsoft C++ (MSVC) refers to the C++, C, and assembly language development tools and libraries available as part of Visual Studio on Windows. These tools and libraries let you create native Windows desktop and server applications, Universal Windows Platform (UWP) apps, or managed apps and libraries that use the .NET Framework. Create cross-platform libraries and apps that run on Windows, Linux, Android, and iOS. You can use MSVC to write anything from simple console apps to the most sophisticated and complex apps for Windows desktop. Write device drivers and operating system components or cross-platform games for mobile devices. Target anything from the smallest IoT devices to multi-server high performance computing in the Azure cloud. -Visual Studio 2015, 2017, 2019, and 2022 can be installed side-by-side. You can use Visual Studio 2019 (compiler toolset v142) or Visual Studio 2017 (v141) to edit and build programs using the toolset from Visual Studio 2017 (v141) and Visual Studio 2015 (v140). +You can install Visual Studio 2015 and later side-by-side. For example, you can use Visual Studio 2019 (compiler toolset v142) or Visual Studio 2017 (v141) to edit and build programs using the toolset from Visual Studio 2017 (v141) and Visual Studio 2015 (v140). ## What's new for C++ in Visual Studio @@ -74,7 +74,7 @@ Learn about the breaking changes in previous versions. ## Install Visual Studio C++ and upgrade from earlier versions [Install C++ support in Visual Studio](../build/vscpp-step-0-installation.md)\ -Download Visual Studio and install the Microsoft C/C++ toolset. +Download Visual Studio and install the Microsoft C++ Build Tools. [Microsoft C++ porting and upgrading guide](../porting/visual-cpp-porting-and-upgrading-guide.md)\ Guidance for porting code and upgrading projects to Visual Studio 2015 or later. Take advantage of greater compiler conformance to the C++ standard, greatly improved compilation times, and security features such as Spectre mitigation. diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index b276614c6a6..5f15f171582 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -9,7 +9,7 @@ ms.subservice: "cpp-lang" Standards conformance for the Microsoft C/C++ compiler in Visual Studio (MSVC) is a work in progress. Here's a summary of ISO Standard C and C++ language and library conformance by Visual Studio version. Each C++ compiler and standard library feature name has a link to the ISO Standard C++ proposal paper that describes the feature, when one is available at publication time. The **Supported** column lists the Visual Studio version in which support for the feature first appeared. -For details on conformance improvements, see [C++ conformance improvements in Visual Studio](cpp-conformance-improvements.md). For a list of other changes, see [What's New for Visual C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md). For conformance changes in earlier versions, see [Visual C++ change history](../porting/visual-cpp-change-history-2003-2015.md) and [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). For current news from the C++ team, visit the [C++ team blog](https://devblogs.microsoft.com/cppblog/). +For details on conformance improvements, see [C++ conformance improvements in Visual Studio](cpp-conformance-improvements.md). For a list of other changes, see [What's New for Microsoft C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md). For conformance changes in earlier versions, see [Visual C++ change history](../porting/visual-cpp-change-history-2003-2015.md) and [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). For current news from the C++ team, visit the [C++ team blog](https://devblogs.microsoft.com/cppblog/). > [!NOTE] > There are no binary breaking changes between Visual Studio 2015, 2017, 2019, and 2022. For more information, see [C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md) @@ -652,7 +652,7 @@ These algorithms aren't presently parallelized: [C++ Language Reference](../cpp/cpp-language-reference.md)\ [C++ Standard Library](../standard-library/cpp-standard-library-reference.md)\ [C++ conformance improvements in Visual Studio](cpp-conformance-improvements.md)\ -[What's New for Visual C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md)\ +[What's New for Microsoft C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md)\ [Visual C++ change history 2003 through 2015](../porting/visual-cpp-change-history-2003-2015.md)\ [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md)\ [C++ team blog](https://devblogs.microsoft.com/cppblog/) diff --git a/docs/overview/visual-cpp-tools-and-features-in-visual-studio-editions.md b/docs/overview/visual-cpp-tools-and-features-in-visual-studio-editions.md index 8f68bdd1c4a..f05857da1e0 100644 --- a/docs/overview/visual-cpp-tools-and-features-in-visual-studio-editions.md +++ b/docs/overview/visual-cpp-tools-and-features-in-visual-studio-editions.md @@ -15,7 +15,7 @@ The following C++ features are available in Visual Studio. Unless stated otherwi ::: moniker range="<=msvc-150" -The following tables show Visual C++ features that are available in Visual Studio 2017. An X in a cell indicates that the feature is available; an empty cell indicates that the feature is not available. Notes in parentheses indicate that a feature is available, but restricted. +The following tables show C++ features that are available in Visual Studio 2017. An X in a cell indicates that the feature is available; an empty cell indicates that the feature is not available. Notes in parentheses indicate that a feature is available, but restricted. ::: moniker-end diff --git a/docs/sanitizers/asan-building.md b/docs/sanitizers/asan-building.md index 09140d51c92..5ea4cf7b5cf 100644 --- a/docs/sanitizers/asan-building.md +++ b/docs/sanitizers/asan-building.md @@ -149,7 +149,6 @@ The linker option [`/INFERASANLIBS:NO`](../build/reference/inferasanlibs.md) pre Prior to Visual Studio 17.7 Preview 3, statically linked (**`/MT`** or **`/MTd`**) builds didn't use a DLL dependency. Instead, the MSVC AddressSanitizer runtime was statically linked into the user's EXE. DLL projects would then load exports from the user's EXE to access ASan functionality. Also, dynamically linked projects (**`/MD`** or **`/MTd`**) used different libraries and DLLs depending on whether the project was configured for debug or release. For more information about these changes and their motivations, see [MSVC AddressSanitizer – One DLL for all Runtime Configurations](https://devblogs.microsoft.com/cppblog/msvc-address-sanitizer-one-dll-for-all-runtime-configurations/). - | CRT runtime option | DLL or EXE | MSVC AddressSanitizer runtime libraries | |--|--|--| | **`/MT`** | EXE | *`/wholearchive:clang_rt.asan-{arch}.lib`*, *`clang_rt.asan_cxx-{arch}.lib`* | diff --git a/docs/sanitizers/asan-continue-on-error.md b/docs/sanitizers/asan-continue-on-error.md index 9d820f863e8..7b590735e84 100644 --- a/docs/sanitizers/asan-continue-on-error.md +++ b/docs/sanitizers/asan-continue-on-error.md @@ -1,16 +1,16 @@ --- -title: "Walkthrough: Use Address Sanitizer Continue On Error to find memory safety issues" -description: "Learn how to use Address Sanitizer continue on error to find memory safety errors in your app." +title: "Walkthrough: Use AddressSanitizer Continue On Error to find memory safety issues" +description: "Learn how to use AddressSanitizer continue on error to find memory safety errors in your app." ms.date: 07/31/2023 f1_keywords: ["AddressSanitizer", "Continue On Error"] helpviewer_keywords: ["ASan", "AddressSanitizer", "Address Sanitizer", "compiling for AddressSanitizer", "Continue On Error", "ASAN continue on error", "Address Sanitizer continue on error"] --- -# Walkthrough: Use Address Sanitizer Continue On Error to find memory safety issues +# Walkthrough: Use AddressSanitizer Continue On Error to find memory safety issues In this walkthrough, create checked builds that find and report memory safety errors. -Memory safety errors like out-of-bounds memory reads and writes, using memory after it has been freed, `NULL` pointer dereferences, and so on, are a top concern for C/C++ code. Address Sanitizer (ASAN) is a compiler and runtime technology that exposes these kinds of hard-to-find bugs, and does it with zero false positives. For an overview of ASAN, see [AddressSanitizer](asan.md). +Memory safety errors like out-of-bounds memory reads and writes, using memory after it has been freed, `NULL` pointer dereferences, and so on, are a top concern for C/C++ code. AddressSanitizer (ASAN) is a compiler and runtime technology that exposes these kinds of hard-to-find bugs, and does it with zero false positives. For an overview of ASAN, see [AddressSanitizer](asan.md). Continue On Error (COE) is a new ASAN feature that automatically diagnoses and reports memory safety errors as your app runs. When your program exits, a summary of unique memory safety errors is output to `stdout`, `stderr`, or to a log file of your choice. When you create a standard C++ checked build with `-fsanitizer=address`, calls to allocators, deallocators such as `free`, `memcpy`, `memset`, and so on, are forwarded to the ASAN runtime. The ASAN runtime provides the same semantics for these functions, but monitors what happens with the memory. ASAN diagnoses and reports hidden memory safety errors, with zero false positives, as your app runs. @@ -67,7 +67,7 @@ In the preceding code, `pointer` is freed twice. This is a contrived example, bu Create a build of the preceding code with COE turned on with the following steps: -1. Compile the code in the developer command prompt you opened earlier: `cl -fsanitize=address -Zi doublefree.cpp`. The `-fsanitize=address` switch turns on ASAN, and `-Zi` creates a separate PDB file that address sanitizer uses to display memory error location information. +1. Compile the code in the developer command prompt you opened earlier: `cl -fsanitize=address -Zi doublefree.cpp`. The `-fsanitize=address` switch turns on ASAN, and `-Zi` creates a separate PDB file that AddressSanitizer uses to display memory error location information. 1. Send ASAN output to `stdout` by setting the `ASAN_OPTIONS` environment variable in the developer command prompt as follows: `set ASAN_OPTIONS=continue_on_error=1` 1. Run the test code with: `doublefree.exe` @@ -213,7 +213,7 @@ Errors are only observable if the page following the allocation is unmapped, or Create a build of the preceding code with COE turned on: -1. Compile the code with `cl -fsanitize=address -Zi coe.cpp`. The `-fsanitize=address` switch turns on ASAN, and `-Zi` creates a separate PDB file that address sanitizer uses to display memory error location information. +1. Compile the code with `cl -fsanitize=address -Zi coe.cpp`. The `-fsanitize=address` switch turns on ASAN, and `-Zi` creates a separate PDB file that AddressSanitizer uses to display memory error location information. 1. Send ASAN output to `stdout` by setting the `ASAN_OPTIONS` environment variable in the developer command prompt as follows: `set ASAN_OPTIONS=continue_on_error=1` 1. Run the test code with: `coe.exe` @@ -263,7 +263,7 @@ File: C:\Users\xxx\Desktop\COE\coe.cpp Raw HitCnt: 1 On Reference: 1-byte-write-heap-buffer-overflow ``` -The default Address Sanitizer runtime behavior terminates the app after reporting the first error it finds. It doesn't allow the "bad" machine instruction to execute. The new Address Sanitizer runtime diagnoses and reports errors, but then executes subsequent instructions. +The default AddressSanitizer runtime behavior terminates the app after reporting the first error it finds. It doesn't allow the "bad" machine instruction to execute. The new AddressSanitizer runtime diagnoses and reports errors, but then executes subsequent instructions. COE tries to automatically return control back to the application after reporting each memory safety error. There are situations when it can't, such as when there's a memory access violation (AV) or a failed memory allocation. COE doesn't continue after access violations that the program's structured exception handling doesn't catch. If COE can't return execution to the app, a `CONTINUE CANCELLED - Deadly Signal. Shutting down.` message is output. @@ -339,7 +339,7 @@ int main() In `main()` a large number is passed to `foo_redundant`, which is ultimately passed to `_alloca()`, which causes `_alloca()` to fail. -This example outputs `pass` when compiled without ASAN (that is, no `-fsanitize=address` switch) but outputs `fail` when compiled with ASAN turned on (that is, with the `-fsanitize=address` switch). That's because without ASAN, the exception code matches `RET_STACK_EXCEPTION` so `cnt` is set to 1. It behaves differently when compiled with ASAN on because the thrown exception is an Address Sanitizer error instead: dynamic-stack-buffer-overflow. That means the code returns `RET_OTHER_EXCEPTION` instead of `RET_STACK_EXCEPTION` so `cnt` isn't set to 1. +This example outputs `pass` when compiled without ASAN (that is, no `-fsanitize=address` switch) but outputs `fail` when compiled with ASAN turned on (that is, with the `-fsanitize=address` switch). That's because without ASAN, the exception code matches `RET_STACK_EXCEPTION` so `cnt` is set to 1. It behaves differently when compiled with ASAN on because the thrown exception is an AddressSanitizer error instead: dynamic-stack-buffer-overflow. That means the code returns `RET_OTHER_EXCEPTION` instead of `RET_STACK_EXCEPTION` so `cnt` isn't set to 1. ## Other benefits diff --git a/docs/sanitizers/asan-flags.md b/docs/sanitizers/asan-flags.md index 63633fa5e46..5b526a8cf1b 100644 --- a/docs/sanitizers/asan-flags.md +++ b/docs/sanitizers/asan-flags.md @@ -1,6 +1,6 @@ --- title: "AddressSanitizer Runtime Options" -description: "List of runtime options for the Microsoft C/C++ Address Sanitizer" +description: "List of runtime options for the Microsoft C/C++ AddressSanitizer" ms.date: 8/08/2025 helpviewer_keywords: ["AddressSanitizer options", "AddressSanitizer flags", "Address sanitizer options", "Address sanitizer flags", "asan options", "asan flags", "sanitizer flags", "asan_options", "AddressSanitizerFlags", "SanitizerCommonFlags"] --- diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index b5d899dabc0..273389bad95 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -77,7 +77,7 @@ The *`clang_rt.asan*.dll`* runtime files are installed next to the compilers in ## Custom property sheet support -The Visual Studio Property Manager window allows you to add custom *`.props`* files to your projects. Even though the **Enable Address Sanitizer** property (``) is shown, the build doesn't honor it. The build doesn't honor it because the custom *`.props`* files are included after *`Microsoft.cpp.props`*, which uses the `` value to set other properties. +The Visual Studio Property Manager window allows you to add custom *`.props`* files to your projects. Even though the **Enable AddressSanitizer** property (``) is shown, the build doesn't honor it. The build doesn't honor it because the custom *`.props`* files are included after *`Microsoft.cpp.props`*, which uses the `` value to set other properties. As a workaround, create a *`Directory.Build.props`* file in the root of your project to define the `` property. For more information, see [Customize C++ builds](/visualstudio/msbuild/customize-your-build#customize-c-builds). diff --git a/docs/sanitizers/asan-runtime.md b/docs/sanitizers/asan-runtime.md index 0f109ebfa68..4ac0c904d8c 100644 --- a/docs/sanitizers/asan-runtime.md +++ b/docs/sanitizers/asan-runtime.md @@ -40,7 +40,7 @@ Even when statically linking, the ASan runtime DLL must be present at runtime--u Before Visual Studio 17.7 Preview 3, statically linked (**`/MT`** or **`/MTd`**) builds didn't use a DLL dependency. Instead, the AddressSanitizer runtime was statically linked into the user's EXE. DLL projects would then load exports from the user's EXE to access ASan functionality. -Dynamically linked projects (**`/MD`** or **`/MDd`**) used different libraries and DLLs depending on whether the project was configured for debug or release. For more information about these changes and their motivations, see [MSVC Address Sanitizer – One DLL for all Runtime Configurations](https://devblogs.microsoft.com/cppblog/msvc-address-sanitizer-one-dll-for-all-runtime-configurations/). +Dynamically linked projects (**`/MD`** or **`/MDd`**) used different libraries and DLLs depending on whether the project was configured for debug or release. For more information about these changes and their motivations, see [MSVC AddressSanitizer – One DLL for all Runtime Configurations](https://devblogs.microsoft.com/cppblog/msvc-address-sanitizer-one-dll-for-all-runtime-configurations/). The following table describes the previous behavior of the AddressSanitizer runtime library linking, before Visual Studio 17.7 Preview 3: @@ -101,7 +101,7 @@ For an illustration of the alignment requirement and potential issues, see the p ## Runtime options -The MSVC AddressSanitizer is a regularly synced fork of the [Clang AddressSanitizer runtime](https://github.com/llvm/llvm-project). As a result, MSVC implicitly inherits many of Clang's ASan runtime options. A complete list of options that we actively maintain and test can be found [here](./asan-flags.md). If you discover options that don't function as expected, [report a bug](https://aka.ms/feedback/report?space=62). +MSVC AddressSanitizer is a regularly synced fork of the [Clang AddressSanitizer runtime](https://github.com/llvm/llvm-project). As a result, MSVC implicitly inherits many of Clang's ASan runtime options. A complete list of options that we actively maintain and test can be found [here](./asan-flags.md). If you discover options that don't function as expected, [report a bug](https://aka.ms/feedback/report?space=62). ### Configure runtime options diff --git a/docs/sanitizers/asan.md b/docs/sanitizers/asan.md index bd9fc7c88c5..80f2a55b825 100644 --- a/docs/sanitizers/asan.md +++ b/docs/sanitizers/asan.md @@ -157,7 +157,7 @@ To enable AddressSanitizer for a [CMake project created to target Windows](../bu 1. Choose the **Edit JSON** link in the editor. This selection switches the view to raw JSON. -1. Add the following snippet to the `"windows-base"` preset, inside `"configurePresets":` to turn on Address Sanitizer: +1. Add the following snippet to the `"windows-base"` preset, inside `"configurePresets":` to turn on AddressSanitizer: ```json "environment": { @@ -192,7 +192,7 @@ To enable AddressSanitizer for a [CMake project created to target Windows](../bu }, ``` -1. Address sanitizer doesn't work if edit-and-continue is specified (`/ZI`), which is enabled by default for new CMake projects. In `CMakeLists.txt`, comment out (prefix with `#`) the line that starts with `set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT"`. That line looks something like this, afterwards: +1. AddressSanitizer doesn't work if edit-and-continue is specified (`/ZI`), which is enabled by default for new CMake projects. In `CMakeLists.txt`, comment out (prefix with `#`) the line that starts with `set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT"`. That line looks something like this, afterwards: ```json # set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$,$>,$<$:EditAndContinue>,$<$:ProgramDatabase>>") diff --git a/docs/sanitizers/error-stack-use-after-return.md b/docs/sanitizers/error-stack-use-after-return.md index f3ee909411e..6ddd807d4a8 100644 --- a/docs/sanitizers/error-stack-use-after-return.md +++ b/docs/sanitizers/error-stack-use-after-return.md @@ -1,13 +1,13 @@ --- title: "Error: stack-use-after-return" -description: "Learn about the stack-use-after-return Address Sanitizer error." +description: "Learn about the stack-use-after-return AddressSanitizer error." ms.date: 03/02/2021 f1_keywords: ["stack-use-after-return"] helpviewer_keywords: ["stack-use-after-return error", "AddressSanitizer error stack-use-after-return"] --- # Error: `stack-use-after-return` -> Address Sanitizer Error: Use of stack memory after return +> AddressSanitizer Error: Use of stack memory after return ## Remarks diff --git a/docs/security/security-best-practices-for-cpp.md b/docs/security/security-best-practices-for-cpp.md index 6cc6c47315c..83ffc267e8e 100644 --- a/docs/security/security-best-practices-for-cpp.md +++ b/docs/security/security-best-practices-for-cpp.md @@ -10,7 +10,7 @@ ms.topic: best-practice This article contains information about security tools and practices. Using them does not make applications immune from attack, but it makes successful attacks less likely. -## Visual C++ Security Features +## Microsoft C++ Security Features These security features are built into the Microsoft C++ compiler and linker: diff --git a/docs/windows/clickonce-deployment-for-visual-cpp-applications.md b/docs/windows/clickonce-deployment-for-visual-cpp-applications.md index 07698cb3de3..1824562d2ab 100644 --- a/docs/windows/clickonce-deployment-for-visual-cpp-applications.md +++ b/docs/windows/clickonce-deployment-for-visual-cpp-applications.md @@ -1,19 +1,19 @@ --- -description: "Learn more about: ClickOnce Deployment for Visual C++ Applications" -title: "ClickOnce Deployment for Visual C++ Applications" +description: "Learn more about: ClickOnce Deployment for Microsoft C++ Applications" +title: "ClickOnce Deployment for Microsoft C++ Applications" ms.date: "11/04/2016" helpviewer_keywords: ["deploying applications [C++], ClickOnce", "application deployment [C++], ClickOnce", "ClickOnce deployment [C++], C++ applications"] --- -# ClickOnce Deployment for Visual C++ Applications +# ClickOnce Deployment for Microsoft C++ Applications Visual Studio provides two different technologies for deploying Windows applications: ClickOnce deployment or [Windows Installer](/windows/win32/Msi/windows-installer-portal) deployment. ## ClickOnce Deployment in C++ > [!NOTE] -> ClickOnce does not support deployment of native C++ applications. However, you can use ClickOnce to deploy a Visual C++ application if it is a dependency of a Visual C# or VB.NET project. For example, if you have a Visual C# project that depends on a Visual C++ project, you can publish the application (including its dependencies) using ClickOnce deployment from the Visual C# development environment. If you have a Visual Basic .NET project that depends on a Visual C++ project, you can publish the application (including its dependencies) using ClickOnce deployment from the Visual Basic .NET development environment. +> ClickOnce does not support deployment of native C++ applications. However, you can use ClickOnce to deploy a Microsoft C++ application if it is a dependency of a C# or VB.NET project. For example, if you have a C# project that depends on a C++ project, you can publish the application (including its dependencies) using ClickOnce deployment from the C# development environment. If you have a Visual Basic .NET project that depends on a C++ project, you can publish the application (including its dependencies) using ClickOnce deployment from the Visual Basic .NET development environment. -To deploy a Visual C++ application using ClickOnce, you first have to build a [ClickOnce Application Manifest](/visualstudio/deployment/clickonce-application-manifest) and a [ClickOnce Deployment Manifest](/visualstudio/deployment/clickonce-deployment-manifest) using the [Mage.exe (Manifest Generation and Editing Tool)](/dotnet/framework/tools/mage-exe-manifest-generation-and-editing-tool) or its graphical user interface version (for information, see [MageUI.exe (Manifest Generation and Editing Tool, Graphical Client)](/dotnet/framework/tools/mageui-exe-manifest-generation-and-editing-tool-graphical-client)). +To deploy a C++ application using ClickOnce, you first have to build a [ClickOnce Application Manifest](/visualstudio/deployment/clickonce-application-manifest) and a [ClickOnce Deployment Manifest](/visualstudio/deployment/clickonce-deployment-manifest) using the [Mage.exe (Manifest Generation and Editing Tool)](/dotnet/framework/tools/mage-exe-manifest-generation-and-editing-tool) or its graphical user interface version (for information, see [MageUI.exe (Manifest Generation and Editing Tool, Graphical Client)](/dotnet/framework/tools/mageui-exe-manifest-generation-and-editing-tool-graphical-client)). You first use Mage.exe to build the application manifest; the resulting file will have the extension .manifest. You then use Mage.exe to build the deployment manifest; the resulting file will have the extension `.application`. You then sign the manifests. @@ -21,7 +21,7 @@ The application manifest must specify the target processor (**x86**, **x64**, or Also, the name of the application and deployment manifests must be different from the name of the C++ application. This avoids conflict between the application manifest created by Mage.exe and the external manifest that is part of the C++ application. -Your deployment needs to install any Visual C++ libraries on which your application depends. To determine the dependencies for a particular application, you can use depends.exe or the `DUMPBIN` utility with the `/DEPENDENTS` option. For more information on dependencies, see [Understanding the Dependencies of a Visual C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md). You might need to run VCRedist.exe; this utility installs Visual C++ libraries on the target computer. +Your deployment needs to install any C++ libraries on which your application depends. To determine the dependencies for a particular application, you can use depends.exe or the `DUMPBIN` utility with the `/DEPENDENTS` option. For more information on dependencies, see [Understanding the Dependencies of a Microsoft C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md). You might need to run VCRedist.exe; this utility installs C++ libraries on the target computer. You may also need to build a bootstrapper (prerequisites installer) for your application to deploy prerequisite components; for information on the bootstrapper, see [Creating Bootstrapper Packages](/visualstudio/deployment/creating-bootstrapper-packages). diff --git a/docs/windows/deploying-native-desktop-applications-visual-cpp.md b/docs/windows/deploying-native-desktop-applications-visual-cpp.md index 883406e495d..f36fc557a67 100644 --- a/docs/windows/deploying-native-desktop-applications-visual-cpp.md +++ b/docs/windows/deploying-native-desktop-applications-visual-cpp.md @@ -1,31 +1,31 @@ --- -description: "Learn more about: Deploying Native Desktop Applications (Visual C++)" -title: "Deploying Native Desktop Applications (Visual C++)" +description: "Learn more about: Deploying Native Desktop Applications (Microsoft C++)" +title: "Deploying Native Desktop Applications (Microsoft C++)" ms.date: "05/11/2018" helpviewer_keywords: ["deploying applications [C++]", "application deployment [C++]", "Visual C++, application deployment", "application deployment [C++], about application deployment", "deploying applications [C++], about deploying applications", "distributing applications [C++]"] ms.assetid: 37f1691e-d67c-41e4-926e-528a237a9bac ms.topic: "overview" ms.custom: intro-deployment --- -# Deploying Native Desktop Applications (Visual C++) +# Deploying Native Desktop Applications (Microsoft C++) Deployment is the process by which you distribute a finished application or component to be installed on other computers. Deployment planning starts when an application is created on a developer's computer. Deployment ends when the application is installed and ready to run on a user's computer. Visual Studio provides different technologies for deploying Windows applications. These include ClickOnce deployment and Windows Installer deployment. -- ClickOnce can be used to deploy C++ applications that target the common language runtime (CLR)—mixed, pure, and verifiable assemblies. Although you can use Windows Installer to deploy a managed application, we recommend that you use ClickOnce because it takes advantage of .NET Framework security features such as manifest signing. ClickOnce does not support deployment of native C++ applications. For more information, see [ClickOnce Deployment for Visual C++ Applications](clickonce-deployment-for-visual-cpp-applications.md). +- ClickOnce can be used to deploy C++ applications that target the common language runtime (CLR)—mixed, pure, and verifiable assemblies. Although you can use Windows Installer to deploy a managed application, we recommend that you use ClickOnce because it takes advantage of .NET Framework security features such as manifest signing. ClickOnce does not support deployment of native C++ applications. For more information, see [ClickOnce Deployment for Microsoft C++ Applications](clickonce-deployment-for-visual-cpp-applications.md). - Windows Installer technology can be used to deploy either native C++ applications or C++ applications that target the CLR. -The articles in this section of the documentation discuss how to ensure that a native Visual C++ application runs on any computer that provides a supported target platform, which files you must include in an installation package, and the recommended ways to redistribute the components that your application depends on. +The articles in this section of the documentation discuss how to ensure that a native Microsoft C++ application runs on any computer that provides a supported target platform, which files you must include in an installation package, and the recommended ways to redistribute the components that your application depends on. ## In This Section -- [Deployment in Visual C++](deployment-in-visual-cpp.md) +- [Deployment in Microsoft C++](deployment-in-visual-cpp.md) - [Deployment Concepts](deployment-concepts.md) -- [Understanding the Dependencies of a Visual C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md) +- [Understanding the Dependencies of a Microsoft C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md) - [Determining Which DLLs to Redistribute](determining-which-dlls-to-redistribute.md) @@ -33,13 +33,13 @@ The articles in this section of the documentation discuss how to ensure that a n - [Universal CRT deployment](universal-crt-deployment.md). -- [Redistributing Visual C++ Files](redistributing-visual-cpp-files.md) +- [Redistributing Microsoft C++ Files](redistributing-visual-cpp-files.md) - [Deployment Examples](deployment-examples.md) - [Redistributing Web Client Applications](redistributing-web-client-applications.md) -- [ClickOnce Deployment for Visual C++ Applications](clickonce-deployment-for-visual-cpp-applications.md) +- [ClickOnce Deployment for Microsoft C++ Applications](clickonce-deployment-for-visual-cpp-applications.md) - [Running a C++ /clr Application on a Previous Runtime Version](running-a-cpp-clr-application-on-a-previous-runtime-version.md) diff --git a/docs/windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md b/docs/windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md index 3ce20bfe3fb..2489c12d56f 100644 --- a/docs/windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md +++ b/docs/windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md @@ -1,6 +1,6 @@ --- -title: "Deploy a Visual C++ App by Using the Redistributable" -description: "Learn how to deploy a Visual C++ application by using the Visual C++ Redistributable package." +title: "Deploy a Microsoft C++ App by Using the Redistributable" +description: "Learn how to deploy a Microsoft C++ application by using the Visual C++ Redistributable package." ms.date: 03/20/2025 ms.topic: tutorial helpviewer_keywords: ["walkthrough, deploying a Visual C++ application by using the redistributable package"] diff --git a/docs/windows/deployment-concepts.md b/docs/windows/deployment-concepts.md index 762b7034ca3..7d74341b303 100644 --- a/docs/windows/deployment-concepts.md +++ b/docs/windows/deployment-concepts.md @@ -19,11 +19,11 @@ You package your application by adding a Setup project to your solution; when bu ## Library Dependencies -When a C/C++ application is built using functionality provided by the Visual C++ libraries, it becomes dependent on the presence of those libraries at runtime. In order for the application to run, it must link, either statically or dynamically, to the necessary Visual C++ libraries. If an application dynamically links to a Visual C++ library, then when it runs that library must be present so it can be loaded. On the other hand, if the application statically links to a Visual C++ library, then it does not need the corresponding DLLs to be present on the user's computer. Static linking, however, has some negative effects, such as the increasing the size of the application files, and making maintenance potentially more difficult. For more information, see [Advantages of using DLLs](../build/dlls-in-visual-cpp.md#advantages-of-using-dlls). +When a C/C++ application is built using functionality provided by the Microsoft C++ libraries, it becomes dependent on the presence of those libraries at runtime. In order for the application to run, it must link, either statically or dynamically, to the necessary Microsoft C++ libraries. If an application dynamically links to a Microsoft C++ library, then when it runs that library must be present so it can be loaded. On the other hand, if the application statically links to a Microsoft C++ library, then it does not need the corresponding DLLs to be present on the user's computer. Static linking, however, has some negative effects, such as the increasing the size of the application files, and making maintenance potentially more difficult. For more information, see [Advantages of using DLLs](../build/dlls-in-visual-cpp.md#advantages-of-using-dlls). ## Packaging and Redistributing -Visual C++ libraries are packaged as DLLs, and all necessary libraries for C/C++ applications are installed by Visual Studio on the developer's computer. However, when deploying your application to your users, it is not feasible in most cases to require them to install Visual Studio in order to run your application. It is important to be able to redistribute just the parts of Visual C++ that are required by your application to run correctly. +Microsoft C++ libraries are packaged as DLLs, and all necessary libraries for C/C++ applications are installed by Visual Studio on the developer's computer. However, when deploying your application to your users, it is not feasible in most cases to require them to install Visual Studio in order to run your application. It is important to be able to redistribute just the parts of Microsoft C++ that are required by your application to run correctly. For more information about packaging and redistributing, see the following topics: @@ -42,4 +42,4 @@ For deployment examples and suggestions about troubleshooting, see: ## See also - [Deploying Desktop Applications](deploying-native-desktop-applications-visual-cpp.md) -- [Understanding the Dependencies of a Visual C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md) +- [Understanding the Dependencies of a Microsoft C++ Application](understanding-the-dependencies-of-a-visual-cpp-application.md) diff --git a/docs/windows/deployment-in-visual-cpp.md b/docs/windows/deployment-in-visual-cpp.md index a343c802a5b..5c39eaabb60 100644 --- a/docs/windows/deployment-in-visual-cpp.md +++ b/docs/windows/deployment-in-visual-cpp.md @@ -1,14 +1,14 @@ --- -description: "Learn more about: Deployment in Visual C++" -title: "Deployment in Visual C++" +description: "Learn more about: Deployment in Microsoft C++" +title: "Deployment in Microsoft C++" ms.date: 06/28/2022 helpviewer_keywords: ["deploying applications [C++]", "application deployment [C++]"] ms.assetid: d4b4ffc0-d2bd-4e4a-84a6-62f1c26f6a09 ms.custom: intro-deployment --- -# Deployment in Visual C++ +# Deployment in Microsoft C++ -Installation of your application on a computer other than your development computer is known as *deployment*. When you deploy a Visual C++ application to another computer, you must install both the application and any library files it depends on. Visual Studio enables three ways to deploy the Visual C++ libraries together with your application: *central deployment*, *local deployment*, and *static linking*. Central deployment puts the library files under the Windows directory, where all applications can access them automatically. Local deployment puts the library files in the same directory as your application. You must redeploy any locally deployed libraries yourself to update them. Static linking binds the library code into your application. You have to recompile and redeploy your application to take advantage of any updates to the libraries when you use static linking. +Installation of your application on a computer other than your development computer is known as *deployment*. When you deploy a Microsoft C++ application to another computer, you must install both the application and any library files it depends on. Visual Studio enables three ways to deploy the Microsoft C++ libraries together with your application: *central deployment*, *local deployment*, and *static linking*. Central deployment puts the library files under the Windows directory, where all applications can access them automatically. Local deployment puts the library files in the same directory as your application. You must redeploy any locally deployed libraries yourself to update them. Static linking binds the library code into your application. You have to recompile and redeploy your application to take advantage of any updates to the libraries when you use static linking. In Visual Studio 2015, the Microsoft C Runtime library was refactored into version-specific local library components, and a new Universal C Runtime library that is now part of Windows. For details on deployment of the Universal CRT, see [Universal CRT deployment](universal-crt-deployment.md). @@ -16,15 +16,15 @@ In Visual Studio 2015, the Microsoft C Runtime library was refactored into versi In central deployment, library DLL files are installed in the *`Windows\System32`* directory, or for 32-bit library files on x64 systems, the *`Windows\SysWow64`* directory. Centrally deployed library files are available to other applications. -To centrally deploy Visual C++ libraries, you can use one of these two sources for the files to install: +To centrally deploy Microsoft C++ libraries, you can use one of these two sources for the files to install: - *Redistributable package* files. These files are stand-alone command-line executables that contain all the Visual C++ Redistributable libraries in compressed form. The latest Redistributable packages are available from [Microsoft Visual C++ Redistributable Latest Supported Downloads](latest-supported-vc-redist.md). When you use the Redistributable packages for central deployment, Windows Update can service the libraries independently. - *Redistributable merge modules* (*`.msm`* files), which you can include in your application's Windows Installer (*`.msi`*) file. This method is deprecated because libraries deployed this way can't be updated automatically by Windows Update. For more information, see [Redistributing by using merge modules](redistributing-components-by-using-merge-modules.md). -A Redistributable package file installs all of the Visual C++ libraries for a particular system architecture. For example, if your application is built for x64, you can use the *`vcredist_x64.exe`* package to install all the Visual C++ libraries your application uses. You can program your application installer to run the package as a prerequisite before you install your application. +A Redistributable package file installs all of the Microsoft C++ libraries for a particular system architecture. For example, if your application is built for x64, you can use the *`vcredist_x64.exe`* package to install all the Microsoft C++ libraries your application uses. You can program your application installer to run the package as a prerequisite before you install your application. -Central deployment by using a Redistributable package enables Windows Update to automatically update the Visual C++ libraries. For continued security and functionality, we recommend that you use the library DLLs in your application instead of static libraries, and use Redistributable packages and central deployment instead of local deployment. +Central deployment by using a Redistributable package enables Windows Update to automatically update the Microsoft C++ libraries. For continued security and functionality, we recommend that you use the library DLLs in your application instead of static libraries, and use Redistributable packages and central deployment instead of local deployment. ## Local deployment @@ -32,15 +32,15 @@ In local deployment, library files are installed in your application folder toge Expansions to a library may be spread across multiple extra DLLs, known as *dot libraries*. For example, some functionality in the standard library released in Visual Studio 2017 version 15.6 was added into *`msvcp140_1.dll`*, to preserve the ABI compatibility of *`msvcp140.dll`*. If you use Visual Studio 2017 version 15.6 (toolset 14.13) or later, you may need to locally deploy both these dot libraries and the main library. These separate dot libraries will eventually be added to the base library, when the ABI changes. -Because Microsoft can't automatically update locally deployed Visual C++ libraries, we don't recommend local deployment of these libraries. If you decide to use local deployment of the Redistributable libraries, we recommend that you implement your own method of automatically updating the locally deployed libraries. +Because Microsoft can't automatically update locally deployed Microsoft C++ libraries, we don't recommend local deployment of these libraries. If you decide to use local deployment of the Redistributable libraries, we recommend that you implement your own method of automatically updating the locally deployed libraries. ## Static linking -In addition to dynamically linked libraries, Visual Studio supplies most of its libraries as static libraries. You can statically link a static library to your application, that is, link the library object code directly into the application. Static linking creates a single binary without a DLL dependency, so that you don't have to deploy the Visual C++ library files separately. However, we don't recommend this approach because statically linked libraries can't be updated in place. To update a linked library when you use static linking, you have to recompile and redeploy your application. +In addition to dynamically linked libraries, Visual Studio supplies most of its libraries as static libraries. You can statically link a static library to your application, that is, link the library object code directly into the application. Static linking creates a single binary without a DLL dependency, so that you don't have to deploy the Microsoft C++ library files separately. However, we don't recommend this approach because statically linked libraries can't be updated in place. To update a linked library when you use static linking, you have to recompile and redeploy your application. ## Troubleshooting deployment issues -The load order of Visual C++ libraries is system-dependent. To diagnose loader issues, use *`depends.exe`* or *`where.exe`*. For more information, see [Dynamic-link library search order (Windows)](/windows/win32/Dlls/dynamic-link-library-search-order). +The load order of Microsoft C++ libraries is system-dependent. To diagnose loader issues, use *`depends.exe`* or *`where.exe`*. For more information, see [Dynamic-link library search order (Windows)](/windows/win32/Dlls/dynamic-link-library-search-order). ## See also diff --git a/docs/windows/toc.yml b/docs/windows/toc.yml index a8a74ff2d76..6b6e16a2dae 100644 --- a/docs/windows/toc.yml +++ b/docs/windows/toc.yml @@ -120,11 +120,11 @@ items: items: - name: Deploy native desktop applications href: ../windows/deploying-native-desktop-applications-visual-cpp.md - - name: Deployment in Visual C++ + - name: Deployment in Microsoft C++ href: ../windows/deployment-in-visual-cpp.md - name: Deployment Concepts href: ../windows/deployment-concepts.md - - name: Understand the dependencies of a Visual C++ application + - name: Understand the dependencies of a Microsoft C++ application href: ../windows/understanding-the-dependencies-of-a-visual-cpp-application.md - name: Determine which DLLs to redistribute href: ../windows/determining-which-dlls-to-redistribute.md @@ -132,7 +132,7 @@ items: href: ../windows/choosing-a-deployment-method.md - name: Universal CRT deployment href: ../windows/universal-crt-deployment.md - - name: Redistribute Visual C++ Files + - name: Redistribute Microsoft C++ Files expanded: false items: - name: Redistribute Visual C++ Files @@ -154,17 +154,17 @@ items: items: - name: Deployment examples href: ../windows/deployment-examples.md - - name: "Walkthrough: Deploy a Visual C++ application by using a setup project" + - name: "Walkthrough: Deploy a Microsoft C++ application by using a setup project" href: ../windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md - - name: "Walkthrough: Deploy a Visual C++ application to an application-local folder" + - name: "Walkthrough: Deploy a Microsoft C++ application to an application-local folder" href: ../windows/walkthrough-deploying-a-visual-cpp-application-to-an-application-local-folder.md - - name: "Walkthrough: Deploy a Visual C++ application by using the Visual C++ Redistributable package" + - name: "Walkthrough: Deploy a Microsoft C++ application by using the Visual C++ Redistributable package" href: ../windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md - name: Prepare a test machine to run a debug executable href: ../windows/preparing-a-test-machine-to-run-a-debug-executable.md - name: Redistribute web client applications href: ../windows/redistributing-web-client-applications.md - - name: ClickOnce deployment for Visual C++ applications + - name: ClickOnce deployment for Microsoft C++ applications href: ../windows/clickonce-deployment-for-visual-cpp-applications.md - name: Run a C++ -clr application on a previous runtime version href: ../windows/running-a-cpp-clr-application-on-a-previous-runtime-version.md diff --git a/docs/windows/understanding-the-dependencies-of-a-visual-cpp-application.md b/docs/windows/understanding-the-dependencies-of-a-visual-cpp-application.md index 935808c0d43..8217b0db85b 100644 --- a/docs/windows/understanding-the-dependencies-of-a-visual-cpp-application.md +++ b/docs/windows/understanding-the-dependencies-of-a-visual-cpp-application.md @@ -1,14 +1,14 @@ --- -description: "Learn more about: Understanding the Dependencies of a Visual C++ Application" -title: "Understanding the Dependencies of a Visual C++ Application" +description: "Learn more about: Understanding the Dependencies of a Microsoft C++ Application" +title: "Understanding the Dependencies of a Microsoft C++ Application" ms.date: "11/04/2016" helpviewer_keywords: ["application deployment [C++], dependencies", "Dependency Walker", "dependencies [C++], application deployment and", "deploying applications [C++], dependencies", "DUMPBIN utility", "DLLs [C++], dependencies", "depends.exe", "libraries [C++], application deployment issues"] ms.assetid: 62a44c95-c389-4c5f-82fd-07d7ef09dbf9 ms.topic: concept-article --- -# Understanding the Dependencies of a Visual C++ Application +# Understanding the Dependencies of a Microsoft C++ Application -To determine which Visual C++ libraries an application depends on, you can view the project properties. (In Solution Explorer, right-click on the project and choose **Properties** to open the **Property Pages** dialog box.) On Windows 8 and earlier, you can also use the Dependency Walker (depends.exe), which gives a more comprehensive picture of the dependencies. For more recent versions of Windows the [lucasg/Dependencies](https://github.com/lucasg/Dependencies) tool provides similar functionality (this is a third-party tool not guaranteed by Microsoft.) +To determine which Microsoft C++ libraries an application depends on, you can view the project properties. (In Solution Explorer, right-click on the project and choose **Properties** to open the **Property Pages** dialog box.) On Windows 8 and earlier, you can also use the Dependency Walker (depends.exe), which gives a more comprehensive picture of the dependencies. For more recent versions of Windows the [lucasg/Dependencies](https://github.com/lucasg/Dependencies) tool provides similar functionality (this is a third-party tool not guaranteed by Microsoft.) In the **Property Pages** dialog box, you can examine various pages under **Configuration Properties** to understand the dependencies. For example, if your project uses the MFC libraries and you choose **Use of MFC**, **Use MFC in a Shared DLL** on the **Configuration Properties**, **General** page, your application at run time depends on MFC DLLs such as mfc\.dll. If your application doesn't use MFC, it might depend on the CRT library if you choose a **Runtime Library** value of **Multi-threaded Debug DLL (/MDd)** or **Multi-threaded DLL (/MD)** on the **Configuration Properties**, **C/C++**, **Code Generation** page. @@ -16,7 +16,7 @@ By using depends.exe, you can examine a list of DLLs that are linked to the appl When you use depends.exe, be aware that a DLL might have a dependency on another DLL or on a specific version of a DLL. You can use depends.exe on either the development computer or on a target computer. On the development computer, depends.exe reports the DLLs that are required to support an application. If you have trouble getting an application to run on a target computer, you can copy depends.exe to it and then open the application in the tool so that you can determine whether any required DLLs are missing or incorrect. -When you know which DLLs your application depends on, you can determine the ones that you have to redistribute with your application when you deploy it to another computer. In most cases, you don't have to redistribute system DLLs, but you may have to redistribute DLLs for Visual C++ libraries. For more information, see [Determining Which DLLs to Redistribute](determining-which-dlls-to-redistribute.md). +When you know which DLLs your application depends on, you can determine the ones that you have to redistribute with your application when you deploy it to another computer. In most cases, you don't have to redistribute system DLLs, but you may have to redistribute DLLs for Microsoft C++ libraries. For more information, see [Determining Which DLLs to Redistribute](determining-which-dlls-to-redistribute.md). ## See also diff --git a/docs/windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md b/docs/windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md index 5b2af3d9365..93ddba07afd 100644 --- a/docs/windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md +++ b/docs/windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md @@ -1,12 +1,12 @@ --- -description: "Learn more about: Walkthrough: Deploy a Visual C++ application by using a setup project" -title: "Deploy a Visual C++ application by using a setup project" +description: "Learn more about: Walkthrough: Deploy a Microsoft C++ application by using a setup project" +title: "Deploy a Microsoft C++ application by using a setup project" ms.date: 06/28/2022 -helpviewer_keywords: ["deployment for Visual C++"] +helpviewer_keywords: ["deployment for Microsoft C++"] ms.custom: intro-deployment ms.topic: install-set-up-deploy --- -# Walkthrough: Deploy a Visual C++ application by using a setup project +# Walkthrough: Deploy a Microsoft C++ application by using a setup project In this walkthrough, you'll create a sample app in Visual Studio, then create a setup project to deploy your app to another computer. @@ -22,7 +22,7 @@ You need the following components to complete this walkthrough: - The Microsoft Visual Studio Installer Projects extension. The extension is free for Visual Studio developers and adds the functionality of the setup and deployment project templates to Visual Studio. -- To test your deployment, another computer that doesn't have the Visual C++ libraries installed. +- To test your deployment, another computer that doesn't have the Microsoft C++ libraries installed. ### To install C++ and MFC in Visual Studio 2022 @@ -62,7 +62,7 @@ If you have Visual Studio installed, but you don't have the C++ or MFC component - The Microsoft Visual Studio Installer Projects extension. The extension is free for Visual Studio developers and adds the functionality of the setup and deployment project templates to Visual Studio. -- To test your deployment, another computer that doesn't have the Visual C++ libraries installed. +- To test your deployment, another computer that doesn't have the Microsoft C++ libraries installed. ### To install C++ and MFC in Visual Studio 2019 @@ -330,7 +330,7 @@ The setup project lets you specify where the components of your app are installe ## Test your deployment -To test your deployment, copy the deployment files to a second computer that doesn't have the Visual C++ libraries installed. Run the setup program. If your app loads and runs normally, and you don't get a runtime error about missing libraries or components, then your deployment is successful. +To test your deployment, copy the deployment files to a second computer that doesn't have the Microsoft C++ libraries installed. Run the setup program. If your app loads and runs normally, and you don't get a runtime error about missing libraries or components, then your deployment is successful. For application testing, you can create a deployment setup program that installs a debug version of your app, along with debug libraries, on machines you control. Debug apps and debug libraries aren't licensed for redistribution, and can't be deployed to customer machines. For more information, see [Preparing a test machine to run a debug executable](../windows/preparing-a-test-machine-to-run-a-debug-executable.md). diff --git a/docs/windows/walkthrough-deploying-a-visual-cpp-application-to-an-application-local-folder.md b/docs/windows/walkthrough-deploying-a-visual-cpp-application-to-an-application-local-folder.md index 3a419091272..c87fa954be4 100644 --- a/docs/windows/walkthrough-deploying-a-visual-cpp-application-to-an-application-local-folder.md +++ b/docs/windows/walkthrough-deploying-a-visual-cpp-application-to-an-application-local-folder.md @@ -1,35 +1,35 @@ --- -description: "Learn more about: Walkthrough: Deploying a Visual C++ Application to an Application-local Folder" -title: "Deploy a Visual C++ Application to an App-local Folder" +description: "Learn more about: Walkthrough: Deploying a Microsoft C++ Application to an Application-local Folder" +title: "Deploy a Microsoft C++ Application to an App-local Folder" ms.date: "04/23/2019" -helpviewer_keywords: ["deploying Visual C++ applications"] +helpviewer_keywords: ["deploying Microsoft C++ applications"] ms.assetid: 47a81c47-9dbe-47c6-96cc-fbb2fda5e6ad ms.custom: intro-deployment ms.topic: install-set-up-deploy --- -# Walkthrough: Deploying a Visual C++ Application to an Application-local Folder +# Walkthrough: Deploying a Microsoft C++ Application to an Application-local Folder -Describes how to deploy a Visual C++ application by copying files to its folder. +Describes how to deploy a Microsoft C++ application by copying files to its folder. ## Prerequisites - A computer that has Visual Studio installed. -- Another computer that doesn't have the Visual C++ libraries. +- Another computer that doesn't have the Microsoft C++ libraries. ### To deploy an application to an application-local folder -1. Create and build an MFC application by following the steps in [Walkthrough: Deploying a Visual C++ Application By Using a Setup Project](walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md). +1. Create and build an MFC application by following the steps in [Walkthrough: Deploying a Microsoft C++ Application By Using a Setup Project](walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project.md). 1. Copy the appropriate MFC and C Run-Time (CRT) library files from the Visual Studio installation directory in the \\VC\\redist\\*version* folder, and then paste them in the \Release\ folder of your MFC project. For more information about other files that you might have to copy, see [Determining Which DLLs to Redistribute](determining-which-dlls-to-redistribute.md). -1. Run the MFC application on a second computer that doesn't have the Visual C++ libraries. +1. Run the MFC application on a second computer that doesn't have the Microsoft C++ libraries. 1. Copy the contents of the \Release\ folder and paste them in the application folder on the second computer. 1. Run the application on the second computer. - The application runs successfully because the Visual C++ libraries are available in the application-local folder. + The application runs successfully because the Microsoft C++ libraries are available in the application-local folder. ## See also From 29395cb360b8e592d6653afb3cdbba7c5f3bef46 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Fri, 31 Oct 2025 14:37:56 -0700 Subject: [PATCH 02/18] draft --- .../overview/msvc-conformance-improvements.md | 307 ++++++++++++++++++ docs/overview/toc.yml | 2 + .../visual-cpp-language-conformance.md | 2 +- 3 files changed, 310 insertions(+), 1 deletion(-) create mode 100644 docs/overview/msvc-conformance-improvements.md diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md new file mode 100644 index 00000000000..fa5f6b3f956 --- /dev/null +++ b/docs/overview/msvc-conformance-improvements.md @@ -0,0 +1,307 @@ +--- +title: "C++ conformance improvements in Microsoft C/C++ (MSVC)" +description: "Summary of conformance improvements in Microsoft C/C++ (MSVC)" +ms.date: 10/31/2025 +ms.service: "visual-cpp" +ms.subservice: "cpp-lang" +--- +# C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C/C++ (MSVC) + +Microsoft C/C++ makes conformance improvements and bug fixes in every release. This article lists the significant improvements by MSVC Build Tools version. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. + +This document lists changes starting in November 2025 when Visual Studio and the MSVC toolset versioning diverged. + +For changes in earlier versions of Visual Studio: + +| Version | Conformance improvements link | +|---|---| +| 2022 | [C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md) | +| 2019 | [C++ conformance improvements in Visual Studio 2019](cpp-conformance-improvements-2019.md) | +| 2017 | [C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md) | +| 2003-2015 | [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md) | + +## C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50 + +Microsoft C/C++ in Visual Studio (MSVC) Build Tools v14.50 introduces significant C++ language updates, conformance improvements, and bug fixes. This version ships with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. You can try out these improvements by [downloading the Insiders release](https://aka.ms/vspreview). + +This document details the C++ language conformance improvements and compiler enhancements included in MSVC Build Tools v14.50. For updates in the Standard Library, check out the [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is regularly updated. + +As C++ standards progress in MSVC, you can follow along using the [cppreference compiler support table](https://en.cppreference.com/w/cpp/compiler_support.html) and help us identify what we should be working on next! + +## C++23 Features + +MSVC Build Tools v14.50 adds support for several C++23 features, bringing the compiler closer to full C++23 conformance. + +### P0849R8: auto(x) - decay-copy in the language + +[P0849R8](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0849r8.html) introduces the `auto(x)` syntax for decay-copy operations directly in the language, providing a more concise way to express decay-copy semantics. + +Prior to P0849R8, you needed to explicitly perform decay operations: + +```cpp +// Prior to P0849R8: +void pop_front_alike(auto& x) { + using T = std::decay_t; + std::erase(x, T(x.front())); +} +``` + +After P0849R8, you can use the simpler `auto(x)` syntax: + +```cpp +// After P0849R8: +void pop_front_alike(auto& x) { + std::erase(x, auto(x.front())); +} +``` + +This feature provides a standardized way to perform decay-copy operations, making code more readable and reducing the need for verbose template metaprogramming. + +### P2437R1: C++23 `#warning` directive + +[P2437R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2437r1.pdf) implements the C++23 `#warning` preprocessor directive, providing a standard way to emit warnings during compilation. + +```cpp +// Valid prior to C++23. +#error bad configuration... + +// Valid after C++23. +#warning configuration deprecated... +``` + +The `#warning` directive allows you to emit diagnostic messages without stopping compilation, making it useful for deprecation notices and configuration warnings. + +### CWG Issue 2586: Explicit object parameter for assignment and comparison + +[CWG Issue 2586](https://cplusplus.github.io/CWG/issues/2586) allows explicit object parameters in assignment and comparison operators, enabling more flexible operator definitions. + +```cpp +struct S { + S& operator=(this S&, const S&) = default; // Valid after CWG2586. + auto operator<=>(this const S&, const S&) = default; // Valid after CWG2586. +}; +``` + +This change allows you to use the explicit object parameter syntax (deducing `this`) in assignment and comparison operators, providing more consistent syntax across different types of member functions. + +### P2280R4: References to unknown values during constant evaluation + +[P2280R4](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2280r4.html) allows references to unknown values during constant evaluation, relaxing restrictions on `constexpr` evaluation. + +```cpp +template +constexpr size_t array_size(T (&)[N]) { + return N; +} + +void check(int const (¶m)[3]) { + constexpr auto s2 = array_size(param); // Previously ill-formed, now accepted as a constant expression after P2280R4. +} +``` + +This improvement allows more code to be evaluated at compile time, particularly when dealing with function parameters in template contexts. + +## Smaller Conformance Updates + +MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance: + +### Core Working Group Issues + +- **CWG2635**: Constrained structured bindings support +- **CWG2465**: Coroutine parameters passed to promise constructor improvements +- **CWG2496**: Ref-qualifiers and virtual overriding corrections +- **CWG2506**: Structured bindings and array cv-qualifiers fixes +- **CWG2507**: Default arguments for `operator[]` support +- **CWG2585**: Behavior alignment with standard requirements +- **CWG2521**: Deprecation of 'operator string-literal identifier' +- **CWG2528**: Relaxed conversion rules for the spaceship operator + +### Language Feature Enhancements + +- **P2360R0**: Extended init-statement definition to allow alias-declarations +- **P2290R3**: C++23 hexadecimal/octal delimited escape sequence support in string literals +- **P2797R0**: Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists +- **P2266R3**: Simpler implicit move semantics + +### Compiler Diagnostics + +- Implementation of a warning to notify of enum type changes caused by `/Zc:enumTypes` + +## Compiler Improvements in v14.50 + +MSVC Build Tools v14.50 includes extensive compiler improvements across multiple areas, focusing on reliability, correctness, and conformance. + +### C++/CLI Improvements + +The C++/CLI compiler received several important fixes: + +- **ICE fixes**: Resolved internal compiler errors on use of `auto` in member declarations in C++/CLI managed types +- **Static constexpr support**: Fixed crashes related to [static constexpr in C++/CLI](https://developercommunity.visualstudio.com/t/static-constexpr-causes-CCLI-compiler/1536217) +- **Friend declarations**: Corrected crashes when [friend functions are used with managed types](https://developercommunity.visualstudio.com/t/Compiler-crash-A-managed-type-cannot-ha/1536159) +- **Stack ref-types**: Fixed crashes in [C++/CLI code using ref-types on stack](https://developercommunity.visualstudio.com/t/clexe-terminates-with-error-code--52970/10777778) +- **MFC compatibility**: Resolved [multiple errors in managed C++ code in MFC applications](https://developercommunity.visualstudio.com/t/Visual-Studio-1712-introduced-multiple-/10792822) + +### Diagnostics Improvements + +Enhanced diagnostic accuracy and clarity: + +- Fixed incorrect diagnostic about [implicit enum type conversions in C even with explicit casts](https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942) + +### `constexpr` Enhancements + +Significant improvements to `constexpr` evaluation and support: + +#### Virtual Function Support +- Fixed errors involving [virtual function calls at compile-time](https://developercommunity.visualstudio.com/t/MSVC-erroneously-claims-the-return-value/10184063) +- Resolved [C++20 constexpr virtual polymorphism issues](https://developercommunity.visualstudio.com/t/C20-constexpr-virtual-polymorphism-is-/10348572) +- Corrected [virtual constexpr function evaluation](https://developercommunity.visualstudio.com/t/Virtual-constexpr-function-did-not-evalu/10360010) + +#### Expression Evaluation +- Improved rejection of [overflow from addition and left shifting of constants](https://developercommunity.visualstudio.com/content/problem/1202945/signed-overflow-in-constant-core-expression-should.html) +- Fixed scenarios where [constructors should be made implicitly constexpr](https://developercommunity.visualstudio.com/t/Multiple-constexpr-bugs-including-regre/10855054) +- Resolved issues with [constexpr static data members and CRTP](https://developercommunity.visualstudio.com/content/problem/1110270/crtp-in-msvc-1924-not-seeing-variable.html) + +#### Advanced `constexpr` Features +- Fixed bugs related to [evaluating destructors of constant objects](https://developercommunity.visualstudio.com/t/MSVC-1437-40-forces-my-global-std::stri/10794576) +- Improved [constexpr lambda captures with guaranteed copy elision](https://developercommunity.visualstudio.com/t/Lambda-in-a-function-template-requests-c/10922885) +- Allowed [consteval constructor calls as direct-initialization arguments](https://developercommunity.visualstudio.com/t/MSVC-Fails-to-compile-list-and-direct-in/10915063) +- Fixed issues with [consteval functions in `if consteval` contexts](https://developercommunity.visualstudio.com/t/The-consteval-function-is-not-an-immedia/10900618) + +### C++ Modules Improvements + +Enhanced C++20 modules support with numerous bug fixes: + +#### Import and Export Fixes +- Fixed bug with [importing friend declarations in nlohmann/json library](https://developercommunity.visualstudio.com/t/nlohmannjson-does-not-compile-as-C20-/10908164) +- Resolved [compiler crashes with using-declarations from specializations](https://developercommunity.visualstudio.com/t/Internal-compiler-error-when-using-usin/10934729) +- Fixed issues where [std::expected couldn't be specialized when imported](https://developercommunity.visualstudio.com/t/C1907-modules-constexpr-and-std::expect/10501314) + +#### Function and Variable Handling +- Corrected problems with [functions using types from named modules](https://developercommunity.visualstudio.com/t/Compiler-uses-non-exported-class-definit/10863347) +- Fixed [importing constexpr functions with static local variables](https://developercommunity.visualstudio.com/t/ICE-when-calling-imported-function-that-/10913469) +- Improved [pragma warning directive handling in modules](https://developercommunity.visualstudio.com/t/pragma-warningdisable-not-working-in-/10937100) + +#### Real-World Compatibility +- Fixed various issues preventing [Unreal Engine 5 from building with header units](https://developercommunity.visualstudio.com/t/Unreal-does-not-build-with-header-units-/10800119) +- Resolved [C++ modules + boost::asio compatibility issues](https://developercommunity.visualstudio.com/t/C20-modules--boost::asio-still-being-/10038468) +- Fixed problems with [specializations in the global module fragment](https://developercommunity.visualstudio.com/t/C20-modules:-specialzations-in-the-glo/10826499) + +### Conformance Enhancements + +Improved adherence to C++ standards: + +#### Attribute Support +- Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076) +- Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch + +#### Template and Specialization Fixes +- [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later +- Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088) +- Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221) + +### Reliability Improvements + +Extensive internal compiler error (ICE) fixes and stability improvements: + +#### Template-Related Fixes +- Fixed [ICE on explicit class template instantiation with friend functions](https://developercommunity.visualstudio.com/t/Internal-compiler-error-ICE-on-explici/10903887) +- Resolved [ICE with explicit variable template instantiations and PCH files](https://developercommunity.visualstudio.com/t/C-explicit-variable-template-instantia/10933044) +- Corrected [compiler crashes with deep nesting of aggregates and initializer lists](https://developercommunity.visualstudio.com/t/Internal-Compiler-Error-Found-in-MSVC-14/10914206) + +#### Lambda-Related Improvements +- Fixed issues with [nested generic lambdas](https://developercommunity.visualstudio.com/t/VS-1714-Preview-30:-ICE:-error-C1001:-/10891418) +- Resolved [ICE with lambda captures and template parameters](https://developercommunity.visualstudio.com/t/ICE-with-nested-std::visit--lambda-capt/10910959) +- Corrected [lambda initialization problems](https://developercommunity.visualstudio.com/t/Internal-compiler-error-with-designated-/10618932) + +#### Memory and Performance +- Fixed [exponential memory growth during type deduction](https://developercommunity.visualstudio.com/t/VS-2022-C-compiler-uses-nearly-200x-as/10900008) with classes having many base classes +- Improved [IL generation for temporaries bound to non-static data member references](https://developercommunity.visualstudio.com/t/CLexe-crashes-with-Access-Violation-on-/10878252) + +### Correctness Improvements + +Enhanced code generation and semantic analysis: + +#### Exception Handling and References +- Fixed [exception handling issues with unions](https://developercommunity.visualstudio.com/t/CLexe-exited-with-code--529706956-whe/10915135) +- Improved [rvalue reference handling in lambda contexts](https://developercommunity.visualstudio.com/t/When-using-a-lambda-as-a-template-argume/10916555) +- Corrected [explicit instantiation overload resolution with requires clauses](https://developercommunity.visualstudio.com/t/Overload-resolution-for-constrained-func/10107770) + +#### Type System and Semantics +- Fixed [noexcept specifier semantic issues](https://developercommunity2.visualstudio.com/t/noexcept-for-some-reason-work-with-type/1321108) +- Improved [phase-1 name binding in non-static data member initializers](https://developercommunity.visualstudio.com/t/Wrong-context-for-class-field-initialize/10896684) +- Corrected [value category determination for indirection and array expressions](https://developercommunity.visualstudio.com/t/cl-Preview-fails-to-properly-determine-a/10907452) + +#### Template and SFINAE +- Fixed [template-id parsing in alias declarations](https://developercommunity.visualstudio.com/t/Source-code-parsing-error-in-boostparse/10869546) +- Improved [partial ordering with template parameter objects](https://developercommunity.visualstudio.com/t/Template-Specialization-is-not-selected-/10902294) +- Resolved [constexpr variable re-declaration issues](https://developercommunity.visualstudio.com/t/A-C1001-error-occurs-in-VS1714/10909397) + +#### Advanced Language Features +- Fixed [`__declspec(no_sanitize_address)` handling on lambdas](https://developercommunity.visualstudio.com/t/Address-Sanitizer-declspecsattributes-d/10850249) +- Improved [static inline data member instantiation points](https://developercommunity.visualstudio.com/t/static-inline-atomic-and-another-atomic-/10203656) +- Corrected [static operator() in abbreviated function templates](https://developercommunity.visualstudio.com/t/Call-to-static-operator-is-elided/10908158) + +#### Standard Library Integration +- Fixed [`std::bit_cast` internal compiler errors](https://developercommunity.visualstudio.com/t/__builtin_bit_cast-Internal-compiler-err/10939926) +- Improved [modulo operator handling in variadic templates](https://developercommunity.visualstudio.com/t/Issue-in-specific-conditions-with-modulo/10940009) +- Resolved [class template argument deduction issues](https://developercommunity.visualstudio.com/t/Deduction-of-class-template-arguments-pi/10939918) + +#### C++20 and C++23 Features +- Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) +- Fixed [`using enum` declaration handling](https://developercommunity.visualstudio.com/t/using-enum-c-20-doesnt-supported-as-we/10926317) +- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) + +### C Compiler Improvements + +#### C23 Language Features +- Fixed `typeof` behavior with function types: In C23, functions no longer [decay to function pointers when used as arguments to `typeof`](https://developercommunity.visualstudio.com/t/__typeof__-not-working-with-function-typ/10891974) + +## Migrating to MSVC Build Tools v14.50 + +When upgrading to MSVC Build Tools v14.50, consider the following potential breaking changes and migration guidance: + +### C++23 Feature Adoption +- Update code to take advantage of new `auto(x)` decay-copy syntax for cleaner template code +- Consider using `#warning` directives for deprecation notices instead of error-prone conditional compilation +- Review explicit object parameter usage in operators for improved consistency + +### `constexpr` Improvements +- Existing `constexpr` code may now compile that previously failed, particularly with virtual functions +- Review constant evaluation code for potential new optimization opportunities +- Update CRTP patterns that may now work correctly with static constexpr members + +### Modules Migration +- Projects using C++20 modules should see improved stability and compatibility +- Header units now work more reliably with large codebases like Unreal Engine 5 +- Consider migrating from traditional headers to modules for better compilation performance + +### Compiler Diagnostics +- New warnings may appear for previously undiagnosed issues +- Review enum type usage if using `/Zc:enumTypes` +- Update code that relies on implicit conversions that may now be flagged + +### C Code Updates +- C23 features are available with `/std:clatest` +- `typeof` behavior changes may affect existing code +- Review preprocessor usage for new `__VA_OPT__` availability + +## Conclusion + +MSVC Build Tools v14.50 represents a significant advancement in C++ compiler technology, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. + +Key highlights include: +- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive +- Comprehensive `constexpr` improvements, particularly for virtual functions +- Major stability improvements for C++ modules +- Extensive reliability fixes reducing internal compiler errors +- Enhanced C++/CLI support for managed code scenarios + +For the latest updates and to provide feedback, please visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). + +If you encounter problems with MSVC in Visual Studio 2026, please let us know via the [Report a Problem](how-to-report-a-problem-with-the-visual-cpp-toolset.md) option, either from the installer or the Visual Studio IDE itself. + +## See also + +[Microsoft C/C++ language conformance](visual-cpp-language-conformance.md) +[What's new for C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md) +[C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md) \ No newline at end of file diff --git a/docs/overview/toc.yml b/docs/overview/toc.yml index 8c34abe851e..e302eaf22c4 100644 --- a/docs/overview/toc.yml +++ b/docs/overview/toc.yml @@ -12,6 +12,8 @@ items: href: ../overview/what-s-new-for-cpp-2019.md - name: What's new for C++ in Visual Studio 2017 href: ../overview/what-s-new-for-cpp-2017.md + - name: C++ Conformance improvements in Microsoft C/C++ (MSVC) + href: ../overview/msvc-conformance-improvements.md - name: C++ conformance improvements in Visual Studio 2022 href: ../overview/cpp-conformance-improvements.md - name: C++ conformance improvements in Visual Studio 2019 diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 5f15f171582..27aac6adca8 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -1,7 +1,7 @@ --- title: "Microsoft C/C++ language conformance" description: "Microsoft C and C++ conformance updates by Visual Studio version." -ms.date: 03/01/2023 +ms.date: 10/31/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- From afc78080a0236054cbaa984f2c7659cc347617da Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Fri, 31 Oct 2025 15:53:02 -0700 Subject: [PATCH 03/18] draft --- .../overview/msvc-conformance-improvements.md | 180 ++++-------------- 1 file changed, 33 insertions(+), 147 deletions(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index fa5f6b3f956..de4b1e6881d 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -22,11 +22,9 @@ For changes in earlier versions of Visual Studio: ## C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50 -Microsoft C/C++ in Visual Studio (MSVC) Build Tools v14.50 introduces significant C++ language updates, conformance improvements, and bug fixes. This version ships with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. You can try out these improvements by [downloading the Insiders release](https://aka.ms/vspreview). +Microsoft C/C++ in Visual Studio (MSVC) Build Tools v14.50 introduces significant C++ language updates, conformance improvements, and bug fixes. This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. -This document details the C++ language conformance improvements and compiler enhancements included in MSVC Build Tools v14.50. For updates in the Standard Library, check out the [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is regularly updated. - -As C++ standards progress in MSVC, you can follow along using the [cppreference compiler support table](https://en.cppreference.com/w/cpp/compiler_support.html) and help us identify what we should be working on next! +This document details the C++ language conformance improvements and compiler enhancements included in MSVC Build Tools v14.50. For more information about updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is regularly updated. ## C++23 Features @@ -40,7 +38,8 @@ Prior to P0849R8, you needed to explicitly perform decay operations: ```cpp // Prior to P0849R8: -void pop_front_alike(auto& x) { +void pop_front_alike(auto& x) +{ using T = std::decay_t; std::erase(x, T(x.front())); } @@ -50,7 +49,8 @@ After P0849R8, you can use the simpler `auto(x)` syntax: ```cpp // After P0849R8: -void pop_front_alike(auto& x) { +void pop_front_alike(auto& x) +{ std::erase(x, auto(x.front())); } ``` @@ -69,14 +69,15 @@ This feature provides a standardized way to perform decay-copy operations, makin #warning configuration deprecated... ``` -The `#warning` directive allows you to emit diagnostic messages without stopping compilation, making it useful for deprecation notices and configuration warnings. +The `#warning` directive allows you to emit diagnostic messages without stopping compilation, making it useful for deprecation notices and configuration warnings. For more information, see [#warning directive (C/C++)](/cpp/preprocessor/hash-warning-directive-c-cpp). ### CWG Issue 2586: Explicit object parameter for assignment and comparison [CWG Issue 2586](https://cplusplus.github.io/CWG/issues/2586) allows explicit object parameters in assignment and comparison operators, enabling more flexible operator definitions. ```cpp -struct S { +struct S +{ S& operator=(this S&, const S&) = default; // Valid after CWG2586. auto operator<=>(this const S&, const S&) = default; // Valid after CWG2586. }; @@ -90,11 +91,13 @@ This change allows you to use the explicit object parameter syntax (deducing `th ```cpp template -constexpr size_t array_size(T (&)[N]) { +constexpr size_t array_size(T (&)[N]) +{ return N; } -void check(int const (¶m)[3]) { +void check(int const (¶m)[3]) +{ constexpr auto s2 = array_size(param); // Previously ill-formed, now accepted as a constant expression after P2280R4. } ``` @@ -105,157 +108,40 @@ This improvement allows more code to be evaluated at compile time, particularly MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance: -### Core Working Group Issues - -- **CWG2635**: Constrained structured bindings support -- **CWG2465**: Coroutine parameters passed to promise constructor improvements -- **CWG2496**: Ref-qualifiers and virtual overriding corrections -- **CWG2506**: Structured bindings and array cv-qualifiers fixes -- **CWG2507**: Default arguments for `operator[]` support -- **CWG2585**: Behavior alignment with standard requirements -- **CWG2521**: Deprecation of 'operator string-literal identifier' -- **CWG2528**: Relaxed conversion rules for the spaceship operator - -### Language Feature Enhancements - -- **P2360R0**: Extended init-statement definition to allow alias-declarations -- **P2290R3**: C++23 hexadecimal/octal delimited escape sequence support in string literals -- **P2797R0**: Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists -- **P2266R3**: Simpler implicit move semantics - -### Compiler Diagnostics - -- Implementation of a warning to notify of enum type changes caused by `/Zc:enumTypes` - -## Compiler Improvements in v14.50 - -MSVC Build Tools v14.50 includes extensive compiler improvements across multiple areas, focusing on reliability, correctness, and conformance. - -### C++/CLI Improvements - -The C++/CLI compiler received several important fixes: - -- **ICE fixes**: Resolved internal compiler errors on use of `auto` in member declarations in C++/CLI managed types -- **Static constexpr support**: Fixed crashes related to [static constexpr in C++/CLI](https://developercommunity.visualstudio.com/t/static-constexpr-causes-CCLI-compiler/1536217) -- **Friend declarations**: Corrected crashes when [friend functions are used with managed types](https://developercommunity.visualstudio.com/t/Compiler-crash-A-managed-type-cannot-ha/1536159) -- **Stack ref-types**: Fixed crashes in [C++/CLI code using ref-types on stack](https://developercommunity.visualstudio.com/t/clexe-terminates-with-error-code--52970/10777778) -- **MFC compatibility**: Resolved [multiple errors in managed C++ code in MFC applications](https://developercommunity.visualstudio.com/t/Visual-Studio-1712-introduced-multiple-/10792822) - -### Diagnostics Improvements - -Enhanced diagnostic accuracy and clarity: - -- Fixed incorrect diagnostic about [implicit enum type conversions in C even with explicit casts](https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942) - -### `constexpr` Enhancements - -Significant improvements to `constexpr` evaluation and support: - -#### Virtual Function Support -- Fixed errors involving [virtual function calls at compile-time](https://developercommunity.visualstudio.com/t/MSVC-erroneously-claims-the-return-value/10184063) -- Resolved [C++20 constexpr virtual polymorphism issues](https://developercommunity.visualstudio.com/t/C20-constexpr-virtual-polymorphism-is-/10348572) -- Corrected [virtual constexpr function evaluation](https://developercommunity.visualstudio.com/t/Virtual-constexpr-function-did-not-evalu/10360010) - -#### Expression Evaluation -- Improved rejection of [overflow from addition and left shifting of constants](https://developercommunity.visualstudio.com/content/problem/1202945/signed-overflow-in-constant-core-expression-should.html) -- Fixed scenarios where [constructors should be made implicitly constexpr](https://developercommunity.visualstudio.com/t/Multiple-constexpr-bugs-including-regre/10855054) -- Resolved issues with [constexpr static data members and CRTP](https://developercommunity.visualstudio.com/content/problem/1110270/crtp-in-msvc-1924-not-seeing-variable.html) - -#### Advanced `constexpr` Features -- Fixed bugs related to [evaluating destructors of constant objects](https://developercommunity.visualstudio.com/t/MSVC-1437-40-forces-my-global-std::stri/10794576) -- Improved [constexpr lambda captures with guaranteed copy elision](https://developercommunity.visualstudio.com/t/Lambda-in-a-function-template-requests-c/10922885) -- Allowed [consteval constructor calls as direct-initialization arguments](https://developercommunity.visualstudio.com/t/MSVC-Fails-to-compile-list-and-direct-in/10915063) -- Fixed issues with [consteval functions in `if consteval` contexts](https://developercommunity.visualstudio.com/t/The-consteval-function-is-not-an-immedia/10900618) - -### C++ Modules Improvements - -Enhanced C++20 modules support with numerous bug fixes: - -#### Import and Export Fixes -- Fixed bug with [importing friend declarations in nlohmann/json library](https://developercommunity.visualstudio.com/t/nlohmannjson-does-not-compile-as-C20-/10908164) -- Resolved [compiler crashes with using-declarations from specializations](https://developercommunity.visualstudio.com/t/Internal-compiler-error-when-using-usin/10934729) -- Fixed issues where [std::expected couldn't be specialized when imported](https://developercommunity.visualstudio.com/t/C1907-modules-constexpr-and-std::expect/10501314) - -#### Function and Variable Handling -- Corrected problems with [functions using types from named modules](https://developercommunity.visualstudio.com/t/Compiler-uses-non-exported-class-definit/10863347) -- Fixed [importing constexpr functions with static local variables](https://developercommunity.visualstudio.com/t/ICE-when-calling-imported-function-that-/10913469) -- Improved [pragma warning directive handling in modules](https://developercommunity.visualstudio.com/t/pragma-warningdisable-not-working-in-/10937100) - -#### Real-World Compatibility -- Fixed various issues preventing [Unreal Engine 5 from building with header units](https://developercommunity.visualstudio.com/t/Unreal-does-not-build-with-header-units-/10800119) -- Resolved [C++ modules + boost::asio compatibility issues](https://developercommunity.visualstudio.com/t/C20-modules--boost::asio-still-being-/10038468) -- Fixed problems with [specializations in the global module fragment](https://developercommunity.visualstudio.com/t/C20-modules:-specialzations-in-the-glo/10826499) +- [CWG2635](https://cplusplus.github.io/CWG/issues/2635): Constrained structured bindings support +- [CWG2465](https://cplusplus.github.io/CWG/issues/2465): Coroutine parameters passed to promise constructor improvements +- [CWG2496](https://cplusplus.github.io/CWG/issues/2496): Ref-qualifiers and virtual overriding corrections +- [CWG2506](https://cplusplus.github.io/CWG/issues/2506): Structured bindings and array cv-qualifiers fixes +- [CWG2507](https://cplusplus.github.io/CWG/issues/2507): Default arguments for `operator[]` support +- [CWG2585](https://cplusplus.github.io/CWG/issues/2585): Behavior alignment with standard requirements +- [CWG2521](https://cplusplus.github.io/CWG/issues/2521): Deprecation of 'operator string-literal identifier' +- [CWG2528](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2528): Relaxed conversion rules for the spaceship operator +- [P2360R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2360r0.html): Extended init-statement definition to allow alias-declarations +- [P2290R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2290r3.pdf): C++23 hexadecimal/octal delimited escape sequence support in string literals +- [P2797R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2797r0.html): Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists +- [P2266R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2266r3.html): Simpler implicit move semantics + +For more information about compiler improvements and bug fixes in MSVC Build Tools v14.50, see [C++ Language Updates in MSVC Build Tools v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/) ### Conformance Enhancements Improved adherence to C++ standards: #### Attribute Support -- Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076) -- Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch +- Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076). +- Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch. #### Template and Specialization Fixes -- [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later -- Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088) +- [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later. +- Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088). - Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221) -### Reliability Improvements - -Extensive internal compiler error (ICE) fixes and stability improvements: - -#### Template-Related Fixes -- Fixed [ICE on explicit class template instantiation with friend functions](https://developercommunity.visualstudio.com/t/Internal-compiler-error-ICE-on-explici/10903887) -- Resolved [ICE with explicit variable template instantiations and PCH files](https://developercommunity.visualstudio.com/t/C-explicit-variable-template-instantia/10933044) -- Corrected [compiler crashes with deep nesting of aggregates and initializer lists](https://developercommunity.visualstudio.com/t/Internal-Compiler-Error-Found-in-MSVC-14/10914206) - -#### Lambda-Related Improvements -- Fixed issues with [nested generic lambdas](https://developercommunity.visualstudio.com/t/VS-1714-Preview-30:-ICE:-error-C1001:-/10891418) -- Resolved [ICE with lambda captures and template parameters](https://developercommunity.visualstudio.com/t/ICE-with-nested-std::visit--lambda-capt/10910959) -- Corrected [lambda initialization problems](https://developercommunity.visualstudio.com/t/Internal-compiler-error-with-designated-/10618932) - -#### Memory and Performance -- Fixed [exponential memory growth during type deduction](https://developercommunity.visualstudio.com/t/VS-2022-C-compiler-uses-nearly-200x-as/10900008) with classes having many base classes -- Improved [IL generation for temporaries bound to non-static data member references](https://developercommunity.visualstudio.com/t/CLexe-crashes-with-Access-Violation-on-/10878252) - -### Correctness Improvements - -Enhanced code generation and semantic analysis: - -#### Exception Handling and References -- Fixed [exception handling issues with unions](https://developercommunity.visualstudio.com/t/CLexe-exited-with-code--529706956-whe/10915135) -- Improved [rvalue reference handling in lambda contexts](https://developercommunity.visualstudio.com/t/When-using-a-lambda-as-a-template-argume/10916555) -- Corrected [explicit instantiation overload resolution with requires clauses](https://developercommunity.visualstudio.com/t/Overload-resolution-for-constrained-func/10107770) - -#### Type System and Semantics -- Fixed [noexcept specifier semantic issues](https://developercommunity2.visualstudio.com/t/noexcept-for-some-reason-work-with-type/1321108) -- Improved [phase-1 name binding in non-static data member initializers](https://developercommunity.visualstudio.com/t/Wrong-context-for-class-field-initialize/10896684) -- Corrected [value category determination for indirection and array expressions](https://developercommunity.visualstudio.com/t/cl-Preview-fails-to-properly-determine-a/10907452) - -#### Template and SFINAE -- Fixed [template-id parsing in alias declarations](https://developercommunity.visualstudio.com/t/Source-code-parsing-error-in-boostparse/10869546) -- Improved [partial ordering with template parameter objects](https://developercommunity.visualstudio.com/t/Template-Specialization-is-not-selected-/10902294) -- Resolved [constexpr variable re-declaration issues](https://developercommunity.visualstudio.com/t/A-C1001-error-occurs-in-VS1714/10909397) - -#### Advanced Language Features -- Fixed [`__declspec(no_sanitize_address)` handling on lambdas](https://developercommunity.visualstudio.com/t/Address-Sanitizer-declspecsattributes-d/10850249) -- Improved [static inline data member instantiation points](https://developercommunity.visualstudio.com/t/static-inline-atomic-and-another-atomic-/10203656) -- Corrected [static operator() in abbreviated function templates](https://developercommunity.visualstudio.com/t/Call-to-static-operator-is-elided/10908158) - -#### Standard Library Integration -- Fixed [`std::bit_cast` internal compiler errors](https://developercommunity.visualstudio.com/t/__builtin_bit_cast-Internal-compiler-err/10939926) -- Improved [modulo operator handling in variadic templates](https://developercommunity.visualstudio.com/t/Issue-in-specific-conditions-with-modulo/10940009) -- Resolved [class template argument deduction issues](https://developercommunity.visualstudio.com/t/Deduction-of-class-template-arguments-pi/10939918) #### C++20 and C++23 Features + - Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) -- Fixed [`using enum` declaration handling](https://developercommunity.visualstudio.com/t/using-enum-c-20-doesnt-supported-as-we/10926317) - Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) -### C Compiler Improvements - -#### C23 Language Features -- Fixed `typeof` behavior with function types: In C23, functions no longer [decay to function pointers when used as arguments to `typeof`](https://developercommunity.visualstudio.com/t/__typeof__-not-working-with-function-typ/10891974) - ## Migrating to MSVC Build Tools v14.50 When upgrading to MSVC Build Tools v14.50, consider the following potential breaking changes and migration guidance: @@ -287,7 +173,7 @@ When upgrading to MSVC Build Tools v14.50, consider the following potential brea ## Conclusion -MSVC Build Tools v14.50 represents a significant advancement in C++ compiler technology, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. +MSVC Build Tools v14.50 represents a significant advancement to the MSVC compiler, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. Key highlights include: - Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive From 8c51c47bbdc9e6c57a3ca35be2fd78233bce924a Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Fri, 31 Oct 2025 16:20:17 -0700 Subject: [PATCH 04/18] draft --- docs/overview/visual-cpp-language-conformance.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 27aac6adca8..b402d513cb4 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -476,17 +476,22 @@ A more detailed listing of Standard Library features and bug fixes by product ve |  [`P2166R1 Prohibit basic_string and basic_string_view from being constructed from nullptr`](https://wg21.link/P2166R1) | VS 2022 17.0 [23](#note_23), [R](#note_R) | |  [`P2186R2 Removed garbage collection support`](https://wg21.link/P2186R2) | VS 2022 17.0 [23](#note_23), [Q](#note_Q) | |  [`P2251R1 Require span And basic_string_view To Be Trivially Copyable`](https://wg21.link/p2251r1) | VS 2022 17.1 [23](#note_23) | +|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 14.50 [23](#note_23) | |  [`P2273R3 constexpr unique_ptr`](https://wg21.link/p2273r3) | VS 2022 17.3 [23](#note_23) | +|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 14.50 [23](#note_23) | +|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 14.50 [23](#note_23) | |  [`P2291R3 constexpr Integral `](https://wg21.link/p2291r3) | VS 2022 17.4 [23](#note_23) | |  [`P2302R4 ranges::contains, ranges::contains_subrange`](https://wg21.link/p2302r4) | VS 2022 17.4 [23](#note_23) | |  [`P2321R2 std::zip`](https://wg21.link/p2321r2) | partial in VS 2022 17.5 [23](#note_23) | |  [`P2322R6 ranges::fold_left, ranges::fold_right, etc.`](https://wg21.link/p2322r6) | VS 2022 17.5 [23](#note_23) | +|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 14.50 [23](#note_23) | |  [`P2387R3 Pipe Support For User-Defined Range Adaptors`](https://wg21.link/p2387r3) | VS 2022 17.4 [23](#note_23) | |  [`P2393R1 Cleaning Up Integer-Class Types`](https://wg21.link/p2393r1) | VS 2022 17.2 [23](#note_23) | |  [`P2401R0 Conditional noexcept For exchange()`](https://wg21.link/p2401r0) | VS 2022 17.1 [23](#note_23) | |  [`P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms`](https://wg21.link/p2408r5) | VS 2022 17.4 [23](#note_23) | |  [`P2417R2 More constexpr bitset`](https://wg21.link/p2417r2) | VS 2022 17.4 [23](#note_23) | |  [`P2419R2 Clarify Handling Of Encodings In Localized Formatting Of chrono Types`](https://wg21.link/p2419r2) | VS 2022 17.4 [23](#note_23) | +|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 14.50 [23](#note_23) | |  [`P2438R2 string::substr() &&`](https://wg21.link/p2438r2) | VS 2022 17.4 [23](#note_23) | |  [`P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right`](https://wg21.link/p2440r1) | VS 2022 17.4 [23](#note_23) | |  [`P2441R2 views::join_with`](https://wg21.link/p2441r2) | VS 2022 17.4 [23](#note_23) | From 2a6681ab649ca9bd23a56a6fed3053c6d9f2001d Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Fri, 31 Oct 2025 19:40:29 -0700 Subject: [PATCH 05/18] draft --- docs/overview/msvc-conformance-improvements.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index de4b1e6881d..1f6a7d5ce63 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -26,6 +26,9 @@ Microsoft C/C++ in Visual Studio (MSVC) Build Tools v14.50 introduces significan This document details the C++ language conformance improvements and compiler enhancements included in MSVC Build Tools v14.50. For more information about updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is regularly updated. +The Microsoft C++ standard library (STL) no longer supports targeting Windows 7 / Server 2008 R2, Windows 8 / Server 2012, or Windows 8.1 / Server 2012 R2.\ +Windows 10 / Server 2016 are the minimum supported operating systems. + ## C++23 Features MSVC Build Tools v14.50 adds support for several C++23 features, bringing the compiler closer to full C++23 conformance. @@ -136,12 +139,17 @@ Improved adherence to C++ standards: - Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088). - Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221) - #### C++20 and C++23 Features - Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) - Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) +## Bug fixes + +Bug fixes for C++ Modules, `constexpr`, and others were made in v14.50. For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) + +https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#constexpr + ## Migrating to MSVC Build Tools v14.50 When upgrading to MSVC Build Tools v14.50, consider the following potential breaking changes and migration guidance: From ecb8263581bb6b313ab0efb997f8ad8f7c36d8f6 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Mon, 3 Nov 2025 13:53:10 -0800 Subject: [PATCH 06/18] draft --- .../overview/msvc-conformance-improvements.md | 89 +++++++++++++++++-- .../visual-cpp-language-conformance.md | 8 +- 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 1f6a7d5ce63..d498751da06 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -88,6 +88,51 @@ struct S This change allows you to use the explicit object parameter syntax (deducing `this`) in assignment and comparison operators, providing more consistent syntax across different types of member functions. + +### P2266R1 : Simpler implicit move + +The introduction of [P2266R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html) may cause code that was previously treated as an lvalue to be treated as an xvalue or a prvalue. For example: + +```cpp +#include + +template +T& f(T&& t) +{ + return t; +} + +struct S { }; + +void g() +{ + S s1{ }; + S& s2 = f(std::move(s1)); +} +``` + +In C++20, and earlier, this code would have compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type. + +With C++23, `t` is treated as an xvalue and so it can't bind to an lvalue reference. + +One fix is to change to the return type of the function from `T&` to `T&&` but this may affect code that calls this function. An alternative is to use the feature test macro that is associated with this change. For example: + +```cpp +#include + +template +T& f(T&& t) +{ +#if defined(__cpp_implicit_move) + return static_cast&>(t); +#else + return t; +#endif +} +``` + +Adding the cast means that the value-category of the return expression is now an lvalue and so it can bind to the return type. + ### P2280R4: References to unknown values during constant evaluation [P2280R4](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2280r4.html) allows references to unknown values during constant evaluation, relaxing restrictions on `constexpr` evaluation. @@ -126,29 +171,61 @@ MSVC Build Tools v14.50 includes numerous smaller conformance improvements that For more information about compiler improvements and bug fixes in MSVC Build Tools v14.50, see [C++ Language Updates in MSVC Build Tools v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/) -### Conformance Enhancements +## Conformance Enhancements Improved adherence to C++ standards: -#### Attribute Support +### Attribute Support + - Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076). - Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch. -#### Template and Specialization Fixes +### Template and Specialization Fixes + - [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later. - Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088). - Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221) -#### C++20 and C++23 Features +### C++20 and C++23 Features - Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) - Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) ## Bug fixes -Bug fixes for C++ Modules, `constexpr`, and others were made in v14.50. For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) +Bug fixes for C++ Modules, `constexpr`, and other fixes were made in v14.50. For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) + +**Encoding of certain non-type template arguments corrected** + +Affects `/stdc++20` or later. + +Certain non-type pointer type template arguments involving sub-objects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide. + +```cpp +struct A +{ + int x; +}; + +struct B +{ + int y; +}; + +template void f(); + +int main() +{ + static A a; + static B b; + constexpr auto px = &a.x; + constexpr auto py = &b.y; + f(); // incorrect encoding of argument 'px' + f(); // incorrect encoding of argument 'py', collided with 'px'. +} +``` -https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#constexpr +With this fix, the two calls to `f` get distinct encodings, as required. ## Migrating to MSVC Build Tools v14.50 diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index b402d513cb4..81b31336047 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -1,7 +1,7 @@ --- title: "Microsoft C/C++ language conformance" description: "Microsoft C and C++ conformance updates by Visual Studio version." -ms.date: 10/31/2025 +ms.date: 11/03/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- @@ -197,6 +197,7 @@ For details on conformance improvements, see [C++ conformance improvements in Vi |  [`P2173R1 Attributes on Lambda-Expressions`](https://wg21.link/p2173r1) | no | |  [`P2186R2 Remove Garbage Collection Support`](https://wg21.link/p2186r2) | VS 2022 17.0 [23](#note_23) | |  [`P2201R1 Mixed string literal concatenation`](https://wg21.link/p2201r1) | no | +|  [`P2266R1 Simpler implicit move`](https://wg21.link/p2266r1) | VS 2026 18.0 [24](#note_24) | |  [`P2223R2 Trimming whitespaces before line splicing`](https://wg21.link/p2223r2) | no | |  [`P2242R3 Non-literal variables (and labels and gotos) in constexpr functions`](https://wg21.link/p2242r3) | no | |  [`P2246R1 Character encoding of diagnostic text`](https://wg21.link/p2246r1) | VS 2022 17.0 [23](#note_23) | @@ -575,7 +576,8 @@ A group of papers listed together indicates a Standard feature along with one or **VS 2022 17.2** Supported in Visual Studio 2022 version 17.2.\ **VS 2022 17.3** Supported in Visual Studio 2022 version 17.3.\ **VS 2022 17.4** Supported in Visual Studio 2022 version 17.4.\ -**VS 2022 17.5** Supported in Visual Studio 2022 version 17.5. +**VS 2022 17.5** Supported in Visual Studio 2022 version 17.5.\ +**VS 2022 18** Supported in Visual Studio 2026 and beyond. ### Notes @@ -646,6 +648,8 @@ These algorithms aren't presently parallelized: **23** In Visual Studio 2022 version 17.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. + **24** In Visual Studio 2026 version 18.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. + **C11** Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](./install-c17-support.md). **DR** These features are enabled in all C++ [`/std`](../build/reference/std-specify-language-standard-version.md) compiler option modes. The C++ Standard committee adopted this change as a retroactive Defect Report to C++11 and all later versions. From 66de82c9f78b85319e64c58f1298308e2aefcd42 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Mon, 3 Nov 2025 14:06:11 -0800 Subject: [PATCH 07/18] draft --- .../overview/msvc-conformance-improvements.md | 81 +++++++++---------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index d498751da06..dd26387a8f2 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -1,7 +1,7 @@ --- title: "C++ conformance improvements in Microsoft C/C++ (MSVC)" description: "Summary of conformance improvements in Microsoft C/C++ (MSVC)" -ms.date: 10/31/2025 +ms.date: 11/03/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- @@ -22,12 +22,20 @@ For changes in earlier versions of Visual Studio: ## C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50 -Microsoft C/C++ in Visual Studio (MSVC) Build Tools v14.50 introduces significant C++ language updates, conformance improvements, and bug fixes. This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. +MSVC Build Tools v14.50 represents a significant advancement to the MSVC compiler, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. + +This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. -This document details the C++ language conformance improvements and compiler enhancements included in MSVC Build Tools v14.50. For more information about updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is regularly updated. +Key highlights include: +- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive +- Comprehensive `constexpr` improvements, particularly for virtual functions +- Major stability improvements for C++ modules +- Extensive reliability fixes reducing internal compiler errors +- Enhanced C++/CLI support for managed code scenarios +- The Microsoft C++ standard library (STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2.\ +- Windows 10/Server 2016 are the minimum supported operating systems.\ -The Microsoft C++ standard library (STL) no longer supports targeting Windows 7 / Server 2008 R2, Windows 8 / Server 2012, or Windows 8.1 / Server 2012 R2.\ -Windows 10 / Server 2016 are the minimum supported operating systems. +For more information about performance improvements, bug fixes, and conformance updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is updated regularly. ## C++23 Features @@ -88,7 +96,6 @@ struct S This change allows you to use the explicit object parameter syntax (deducing `this`) in assignment and comparison operators, providing more consistent syntax across different types of member functions. - ### P2266R1 : Simpler implicit move The introduction of [P2266R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html) may cause code that was previously treated as an lvalue to be treated as an xvalue or a prvalue. For example: @@ -111,10 +118,8 @@ void g() } ``` -In C++20, and earlier, this code would have compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type. - -With C++23, `t` is treated as an xvalue and so it can't bind to an lvalue reference. - +In C++20, and earlier, this code would have compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type.\ +With C++23, `t` is treated as an xvalue and so it can't bind to an lvalue reference.\ One fix is to change to the return type of the function from `T&` to `T&&` but this may affect code that calls this function. An alternative is to use the feature test macro that is associated with this change. For example: ```cpp @@ -152,25 +157,6 @@ void check(int const (¶m)[3]) This improvement allows more code to be evaluated at compile time, particularly when dealing with function parameters in template contexts. -## Smaller Conformance Updates - -MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance: - -- [CWG2635](https://cplusplus.github.io/CWG/issues/2635): Constrained structured bindings support -- [CWG2465](https://cplusplus.github.io/CWG/issues/2465): Coroutine parameters passed to promise constructor improvements -- [CWG2496](https://cplusplus.github.io/CWG/issues/2496): Ref-qualifiers and virtual overriding corrections -- [CWG2506](https://cplusplus.github.io/CWG/issues/2506): Structured bindings and array cv-qualifiers fixes -- [CWG2507](https://cplusplus.github.io/CWG/issues/2507): Default arguments for `operator[]` support -- [CWG2585](https://cplusplus.github.io/CWG/issues/2585): Behavior alignment with standard requirements -- [CWG2521](https://cplusplus.github.io/CWG/issues/2521): Deprecation of 'operator string-literal identifier' -- [CWG2528](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2528): Relaxed conversion rules for the spaceship operator -- [P2360R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2360r0.html): Extended init-statement definition to allow alias-declarations -- [P2290R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2290r3.pdf): C++23 hexadecimal/octal delimited escape sequence support in string literals -- [P2797R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2797r0.html): Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists -- [P2266R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2266r3.html): Simpler implicit move semantics - -For more information about compiler improvements and bug fixes in MSVC Build Tools v14.50, see [C++ Language Updates in MSVC Build Tools v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/) - ## Conformance Enhancements Improved adherence to C++ standards: @@ -189,11 +175,30 @@ Improved adherence to C++ standards: ### C++20 and C++23 Features - Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) -- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) +- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731)- + +### Smaller Conformance Updates + +MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance: + +- [CWG2635](https://cplusplus.github.io/CWG/issues/2635): Constrained structured bindings support +- [CWG2465](https://cplusplus.github.io/CWG/issues/2465): Coroutine parameters passed to promise constructor improvements +- [CWG2496](https://cplusplus.github.io/CWG/issues/2496): Ref-qualifiers and virtual overriding corrections +- [CWG2506](https://cplusplus.github.io/CWG/issues/2506): Structured bindings and array cv-qualifiers fixes +- [CWG2507](https://cplusplus.github.io/CWG/issues/2507): Default arguments for `operator[]` support +- [CWG2585](https://cplusplus.github.io/CWG/issues/2585): Behavior alignment with standard requirements +- [CWG2521](https://cplusplus.github.io/CWG/issues/2521): Deprecation of 'operator string-literal identifier' +- [CWG2528](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2528): Relaxed conversion rules for the spaceship operator +- [P2360R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2360r0.html): Extended init-statement definition to allow alias-declarations +- [P2290R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2290r3.pdf): C++23 hexadecimal/octal delimited escape sequence support in string literals +- [P2797R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2797r0.html): Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists +- [P2266R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2266r3.html): Simpler implicit move semantics ## Bug fixes -Bug fixes for C++ Modules, `constexpr`, and other fixes were made in v14.50. For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) +Bug fixes for C++ Modules, `constexpr`, and other fixes were made in v14.50. + +For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) **Encoding of certain non-type template arguments corrected** @@ -256,16 +261,6 @@ When upgrading to MSVC Build Tools v14.50, consider the following potential brea - `typeof` behavior changes may affect existing code - Review preprocessor usage for new `__VA_OPT__` availability -## Conclusion - -MSVC Build Tools v14.50 represents a significant advancement to the MSVC compiler, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. - -Key highlights include: -- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive -- Comprehensive `constexpr` improvements, particularly for virtual functions -- Major stability improvements for C++ modules -- Extensive reliability fixes reducing internal compiler errors -- Enhanced C++/CLI support for managed code scenarios For the latest updates and to provide feedback, please visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). @@ -273,6 +268,6 @@ If you encounter problems with MSVC in Visual Studio 2026, please let us know vi ## See also -[Microsoft C/C++ language conformance](visual-cpp-language-conformance.md) -[What's new for C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md) +[Microsoft C/C++ language conformance](visual-cpp-language-conformance.md)\ +[What's new for C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md)\ [C++ conformance improvements in Visual Studio 2022](cpp-conformance-improvements.md) \ No newline at end of file From 8c04d590ebf7cad65ba935cd8ce206dca1b8fdd7 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Mon, 3 Nov 2025 14:40:06 -0800 Subject: [PATCH 08/18] draft --- .../overview/msvc-conformance-improvements.md | 65 +++++++++---------- .../visual-cpp-language-conformance.md | 24 +++---- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index dd26387a8f2..17674b03f5d 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -7,9 +7,7 @@ ms.subservice: "cpp-lang" --- # C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C/C++ (MSVC) -Microsoft C/C++ makes conformance improvements and bug fixes in every release. This article lists the significant improvements by MSVC Build Tools version. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. - -This document lists changes starting in November 2025 when Visual Studio and the MSVC toolset versioning diverged. +Microsoft C/C++ makes conformance improvements and bug fixes in every release. Starting with Visual Studio 2026 18.0, major improvements are organized by MSVC Build Tools version number. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. For changes in earlier versions of Visual Studio: @@ -22,18 +20,18 @@ For changes in earlier versions of Visual Studio: ## C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50 -MSVC Build Tools v14.50 represents a significant advancement to the MSVC compiler, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects. +MSVC Build Tools v14.50 introduces improvements to the MSVC compiler and Standard Library, including better C++23 standards conformance, enhanced reliability, and improved correctness. This release also includes numerous bug fixes and updates that benefit large-scale C++ development. This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. -Key highlights include: -- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive -- Comprehensive `constexpr` improvements, particularly for virtual functions -- Major stability improvements for C++ modules -- Extensive reliability fixes reducing internal compiler errors -- Enhanced C++/CLI support for managed code scenarios -- The Microsoft C++ standard library (STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2.\ -- Windows 10/Server 2016 are the minimum supported operating systems.\ +Key highlights of this release include: +- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive. +- Comprehensive `constexpr` improvements, particularly for virtual functions. +- Major stability improvements for C++ modules. +- Extensive reliability fixes reducing internal compiler errors. +- Enhanced C++/CLI support for managed code scenarios. +- The Microsoft C++ standard library (MSVC STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2. +- Windows 10/Server 2016 are the minimum supported operating systems. For more information about performance improvements, bug fixes, and conformance updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is updated regularly. @@ -45,10 +43,10 @@ MSVC Build Tools v14.50 adds support for several C++23 features, bringing the co [P0849R8](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0849r8.html) introduces the `auto(x)` syntax for decay-copy operations directly in the language, providing a more concise way to express decay-copy semantics. -Prior to P0849R8, you needed to explicitly perform decay operations: +Before P0849R8, you needed to explicitly perform decay operations: ```cpp -// Prior to P0849R8: +// Before P0849R8: void pop_front_alike(auto& x) { using T = std::decay_t; @@ -73,7 +71,7 @@ This feature provides a standardized way to perform decay-copy operations, makin [P2437R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2437r1.pdf) implements the C++23 `#warning` preprocessor directive, providing a standard way to emit warnings during compilation. ```cpp -// Valid prior to C++23. +// Valid before C++23. #error bad configuration... // Valid after C++23. @@ -118,7 +116,7 @@ void g() } ``` -In C++20, and earlier, this code would have compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type.\ +In C++20, and earlier, this code compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type.\ With C++23, `t` is treated as an xvalue and so it can't bind to an lvalue reference.\ One fix is to change to the return type of the function from `T&` to `T&&` but this may affect code that calls this function. An alternative is to use the feature test macro that is associated with this change. For example: @@ -157,27 +155,27 @@ void check(int const (¶m)[3]) This improvement allows more code to be evaluated at compile time, particularly when dealing with function parameters in template contexts. -## Conformance Enhancements +## Conformance enhancements -Improved adherence to C++ standards: +Improved adherence to C++ standards includes better handling of attributes, templates, and C++20/C++23 features. -### Attribute Support +### Attribute support - Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076). - Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch. -### Template and Specialization Fixes +### Template and specialization fixes - [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later. -- Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088). +- Added `/Zc:enumEncoding` switch to [correctly encode enum nontype template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088). - Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221) ### C++20 and C++23 Features - Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) -- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731)- +- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) -### Smaller Conformance Updates +### Smaller conformance updates MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance: @@ -196,15 +194,15 @@ MSVC Build Tools v14.50 includes numerous smaller conformance improvements that ## Bug fixes -Bug fixes for C++ Modules, `constexpr`, and other fixes were made in v14.50. +Bug fixes for C++ Modules, `constexpr`, and other fixes were made in MSVC v14.50. -For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50) +For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50). -**Encoding of certain non-type template arguments corrected** +**Encoding of certain nontype template arguments corrected** Affects `/stdc++20` or later. -Certain non-type pointer type template arguments involving sub-objects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide. +Certain nontype pointer type template arguments involving subobjects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide. ```cpp struct A @@ -236,33 +234,34 @@ With this fix, the two calls to `f` get distinct encodings, as required. When upgrading to MSVC Build Tools v14.50, consider the following potential breaking changes and migration guidance: -### C++23 Feature Adoption +### C++23 feature adoption - Update code to take advantage of new `auto(x)` decay-copy syntax for cleaner template code - Consider using `#warning` directives for deprecation notices instead of error-prone conditional compilation - Review explicit object parameter usage in operators for improved consistency -### `constexpr` Improvements +### `constexpr` improvements - Existing `constexpr` code may now compile that previously failed, particularly with virtual functions - Review constant evaluation code for potential new optimization opportunities - Update CRTP patterns that may now work correctly with static constexpr members -### Modules Migration +### Modules migration - Projects using C++20 modules should see improved stability and compatibility - Header units now work more reliably with large codebases like Unreal Engine 5 - Consider migrating from traditional headers to modules for better compilation performance -### Compiler Diagnostics +### Compiler diagnostics - New warnings may appear for previously undiagnosed issues - Review enum type usage if using `/Zc:enumTypes` - Update code that relies on implicit conversions that may now be flagged -### C Code Updates +### C code updates - C23 features are available with `/std:clatest` - `typeof` behavior changes may affect existing code - Review preprocessor usage for new `__VA_OPT__` availability +## Provide feedback -For the latest updates and to provide feedback, please visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). +For the latest updates and to provide feedback, visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). If you encounter problems with MSVC in Visual Studio 2026, please let us know via the [Report a Problem](how-to-report-a-problem-with-the-visual-cpp-toolset.md) option, either from the installer or the Visual Studio IDE itself. diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 81b31336047..f77670f7701 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -197,7 +197,7 @@ For details on conformance improvements, see [C++ conformance improvements in Vi |  [`P2173R1 Attributes on Lambda-Expressions`](https://wg21.link/p2173r1) | no | |  [`P2186R2 Remove Garbage Collection Support`](https://wg21.link/p2186r2) | VS 2022 17.0 [23](#note_23) | |  [`P2201R1 Mixed string literal concatenation`](https://wg21.link/p2201r1) | no | -|  [`P2266R1 Simpler implicit move`](https://wg21.link/p2266r1) | VS 2026 18.0 [24](#note_24) | +|  [`P2266R1 Simpler implicit move`](https://wg21.link/p2266r1) | MSVC 14.50 [24](#note_24) | |  [`P2223R2 Trimming whitespaces before line splicing`](https://wg21.link/p2223r2) | no | |  [`P2242R3 Non-literal variables (and labels and gotos) in constexpr functions`](https://wg21.link/p2242r3) | no | |  [`P2246R1 Character encoding of diagnostic text`](https://wg21.link/p2246r1) | VS 2022 17.0 [23](#note_23) | @@ -477,22 +477,22 @@ A more detailed listing of Standard Library features and bug fixes by product ve |  [`P2166R1 Prohibit basic_string and basic_string_view from being constructed from nullptr`](https://wg21.link/P2166R1) | VS 2022 17.0 [23](#note_23), [R](#note_R) | |  [`P2186R2 Removed garbage collection support`](https://wg21.link/P2186R2) | VS 2022 17.0 [23](#note_23), [Q](#note_Q) | |  [`P2251R1 Require span And basic_string_view To Be Trivially Copyable`](https://wg21.link/p2251r1) | VS 2022 17.1 [23](#note_23) | -|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 14.50 [23](#note_23) | +|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 14.50 [24](#note_24) | |  [`P2273R3 constexpr unique_ptr`](https://wg21.link/p2273r3) | VS 2022 17.3 [23](#note_23) | -|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 14.50 [23](#note_23) | -|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 14.50 [23](#note_23) | +|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 14.50 [24](#note_24) | +|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 14.50 [24](#note_24) | |  [`P2291R3 constexpr Integral `](https://wg21.link/p2291r3) | VS 2022 17.4 [23](#note_23) | |  [`P2302R4 ranges::contains, ranges::contains_subrange`](https://wg21.link/p2302r4) | VS 2022 17.4 [23](#note_23) | |  [`P2321R2 std::zip`](https://wg21.link/p2321r2) | partial in VS 2022 17.5 [23](#note_23) | |  [`P2322R6 ranges::fold_left, ranges::fold_right, etc.`](https://wg21.link/p2322r6) | VS 2022 17.5 [23](#note_23) | -|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 14.50 [23](#note_23) | +|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 14.50 [24](#note_24) | |  [`P2387R3 Pipe Support For User-Defined Range Adaptors`](https://wg21.link/p2387r3) | VS 2022 17.4 [23](#note_23) | |  [`P2393R1 Cleaning Up Integer-Class Types`](https://wg21.link/p2393r1) | VS 2022 17.2 [23](#note_23) | |  [`P2401R0 Conditional noexcept For exchange()`](https://wg21.link/p2401r0) | VS 2022 17.1 [23](#note_23) | |  [`P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms`](https://wg21.link/p2408r5) | VS 2022 17.4 [23](#note_23) | |  [`P2417R2 More constexpr bitset`](https://wg21.link/p2417r2) | VS 2022 17.4 [23](#note_23) | |  [`P2419R2 Clarify Handling Of Encodings In Localized Formatting Of chrono Types`](https://wg21.link/p2419r2) | VS 2022 17.4 [23](#note_23) | -|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 14.50 [23](#note_23) | +|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 14.50 [24](#note_24) | |  [`P2438R2 string::substr() &&`](https://wg21.link/p2438r2) | VS 2022 17.4 [23](#note_23) | |  [`P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right`](https://wg21.link/p2440r1) | VS 2022 17.4 [23](#note_23) | |  [`P2441R2 views::join_with`](https://wg21.link/p2441r2) | VS 2022 17.4 [23](#note_23) | @@ -577,11 +577,11 @@ A group of papers listed together indicates a Standard feature along with one or **VS 2022 17.3** Supported in Visual Studio 2022 version 17.3.\ **VS 2022 17.4** Supported in Visual Studio 2022 version 17.4.\ **VS 2022 17.5** Supported in Visual Studio 2022 version 17.5.\ -**VS 2022 18** Supported in Visual Studio 2026 and beyond. +**MSVC 14.50** Supported in MSVC Compiler 14.50 and beyond. Support first shipped with Visual Studio 2026 18.0. ### Notes - **A** In [`/std:c++14`](../build/reference/std-specify-language-standard-version.md) mode, dynamic exception specifications remain unimplemented, and `throw()` is still treated as a synonym for `__declspec(nothrow)`. In C++17, dynamic exception specifications were mostly removed by P0003R5, except for one vestige: `throw()` is deprecated and required to behave as a synonym for **`noexcept`**. In [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) mode, MSVC now conforms to the Standard by giving `throw()` the same behavior as **`noexcept`**, that is, enforcement via termination. + **A** In [`/std:c++14`](../build/reference/std-specify-language-standard-version.md) mode, the compiler leaves dynamic exception specifications unimplemented, and treats `throw()` as a synonym for `__declspec(nothrow)`. In C++17, P0003R5 removed most dynamic exception specifications, except for one vestige: the standard deprecated `throw()` and requires it to behave as a synonym for **`noexcept`**. In [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) mode, MSVC now conforms to the Standard by giving `throw()` the same behavior as **`noexcept`**, that is, enforcement via termination. The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md) requests the old behavior of `__declspec(nothrow)`. It's likely that `throw()` will be removed in a future version of C++. To help with migrating code in response to these changes in the Standard and the Microsoft implementation, new compiler warnings for exception specification issues are added under [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and [`/permissive-`](../build/reference/permissive-standards-conformance.md). @@ -595,7 +595,7 @@ The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md **F** Features removed when the [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) or later compiler option is specified. To re-enable these features (to ease the transition to newer language modes), use these macros: `_HAS_AUTO_PTR_ETC`, `_HAS_FUNCTION_ALLOCATOR_SUPPORT`, `_HAS_OLD_IOSTREAMS_MEMBERS`, and `_HAS_UNEXPECTED`. - **G** C++17's parallel algorithms library is complete. Complete doesn't mean that every algorithm is parallelized in every case. The most important algorithms have been parallelized. Execution policy signatures are provided even where the implementation doesn't parallelize algorithms. The central internal header, ``, contains the following "Parallel Algorithms Notes": C++ allows an implementation to implement parallel algorithms as calls to the serial algorithms. This implementation parallelizes several common algorithm calls, but not all. + **G** C++17's parallel algorithms library is complete. Complete doesn't mean that every algorithm is parallelized in every case. The most important algorithms are parallelized. Execution policy signatures are provided even where the implementation doesn't parallelize algorithms. The central internal header, ``, contains the following "Parallel Algorithms Notes": C++ allows an implementation to implement parallel algorithms as calls to the serial algorithms. This implementation parallelizes several common algorithm calls, but not all. The following algorithms are parallelized: @@ -609,7 +609,7 @@ These algorithms aren't presently parallelized: - `generate`, `generate_n` - Effective parallelism of these algorithms might be infeasible: - `partial_sort`, `partial_sort_copy` -- These algorithms haven't been evaluated yet. The library might implement parallelism in a future release: +- These algorithms aren't evaluated yet. The library might implement parallelism in a future release: - `copy_if`, `includes`, `inplace_merge`, `lexicographical_compare`, `max_element`, `merge`, `min_element`, `minmax_element`, `nth_element`, `partition_copy`, `remove_copy`, `remove_copy_if`, `replace_copy`, `replace_copy_if`, `set_symmetric_difference`, `set_union`, `stable_partition`, `unique`, `unique_copy` **H** This is a wholly new implementation, incompatible with the previous `std::experimental` version, made necessary by symlink support, bug fixes, and changes in standard-required behavior. Currently, `` provides both the new `std::filesystem` and the previous `std::experimental::filesystem`. The `` header provides only the old experimental implementation. Expect removal of the experimental implementation in the next ABI-breaking release of the libraries. @@ -620,7 +620,7 @@ These algorithms aren't presently parallelized: **K** MSVC doesn't support the `_Complex` keyword or native complex types. The Universal CRT `` uses implementation-specific macros to achieve the same effect. For more information, see [C complex math support](../c-runtime-library/complex-math-support.md). - **L** The Universal CRT doesn't implement the `strftime` `E` and `O` alternative conversion modifiers. These modifiers are ignored (for example, `%Oe` behaves the same as `%e`). The modifiers aren't supported by the underlying locale APIs. + **L** The Universal CRT doesn't implement the `strftime` `E` and `O` alternative conversion modifiers. These modifiers are ignored (for example, `%Oe` behaves the same as `%e`). The underlying locale APIs don’t support the modifiers. **M** The Universal CRT doesn't implement C11 `aligned_alloc`, but does provide [`_aligned_malloc`](../c-runtime-library/reference/aligned-malloc.md) and [`_aligned_free`](../c-runtime-library/reference/aligned-free.md). Because the Windows operating system doesn't support aligned allocations, this function is unlikely to be implemented. @@ -648,7 +648,7 @@ These algorithms aren't presently parallelized: **23** In Visual Studio 2022 version 17.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. - **24** In Visual Studio 2026 version 18.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. + **24** In MSVC 14.50 and up, first shipped with Visual Studio 2026 version 18.0, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. **C11** Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](./install-c17-support.md). From a3a60abeefdd2d72c55e14b5479c750924acf389 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:14:46 -0800 Subject: [PATCH 09/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 17674b03f5d..6037985b986 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -33,7 +33,7 @@ Key highlights of this release include: - The Microsoft C++ standard library (MSVC STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2. - Windows 10/Server 2016 are the minimum supported operating systems. -For more information about performance improvements, bug fixes, and conformance updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is updated regularly. +For more information about performance improvements, bug fixes, and conformance updates in the standard library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is updated regularly. ## C++23 Features From c31e6c3b676f70db4170d9dcf53f5935cfff1b60 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:14:59 -0800 Subject: [PATCH 10/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 6037985b986..939869b1086 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -7,7 +7,7 @@ ms.subservice: "cpp-lang" --- # C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C/C++ (MSVC) -Microsoft C/C++ makes conformance improvements and bug fixes in every release. Starting with Visual Studio 2026 18.0, major improvements are organized by MSVC Build Tools version number. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. +Microsoft C++ (MSVC) Build Tools makes conformance improvements and bug fixes in every release. Starting with Visual Studio 2026 version 18.0, major improvements are organized by MSVC Build Tools version number. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. For changes in earlier versions of Visual Studio: From a5347dc169ce4e9cbb108e1e3df2b9cc8b065fc4 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:15:13 -0800 Subject: [PATCH 11/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 939869b1086..034fa1f1023 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -5,7 +5,7 @@ ms.date: 11/03/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- -# C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C/C++ (MSVC) +# C/C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C++ (MSVC) Build Tools Microsoft C++ (MSVC) Build Tools makes conformance improvements and bug fixes in every release. Starting with Visual Studio 2026 version 18.0, major improvements are organized by MSVC Build Tools version number. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. From b9186bcd045d2f6ae35f8cb55666675816b73f12 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:15:25 -0800 Subject: [PATCH 12/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 034fa1f1023..295271f5020 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -1,5 +1,5 @@ --- -title: "C++ conformance improvements in Microsoft C/C++ (MSVC)" +title: "C/C++ conformance improvements in Microsoft C++ (MSVC) Build Tools" description: "Summary of conformance improvements in Microsoft C/C++ (MSVC)" ms.date: 11/03/2025 ms.service: "visual-cpp" From e40fba6ab7dc1be1820090c27ad82f8042cf2d0c Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:15:38 -0800 Subject: [PATCH 13/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 295271f5020..b9445b5ea91 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -20,7 +20,7 @@ For changes in earlier versions of Visual Studio: ## C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50 -MSVC Build Tools v14.50 introduces improvements to the MSVC compiler and Standard Library, including better C++23 standards conformance, enhanced reliability, and improved correctness. This release also includes numerous bug fixes and updates that benefit large-scale C++ development. +MSVC Build Tools v14.50 introduces improvements to the MSVC compiler and standard library, including better C++23 standards conformance, enhanced reliability, and improved correctness. This release also includes numerous bug fixes and updates that benefit large-scale C++ development. This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler. From aef34336c6e34e49133c41f1b597edbe14ef0e81 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Mon, 3 Nov 2025 15:15:48 -0800 Subject: [PATCH 14/18] Apply suggestion from @AugP Co-authored-by: Augustin Popa --- docs/overview/toc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/toc.yml b/docs/overview/toc.yml index e302eaf22c4..a8036cb6331 100644 --- a/docs/overview/toc.yml +++ b/docs/overview/toc.yml @@ -12,7 +12,7 @@ items: href: ../overview/what-s-new-for-cpp-2019.md - name: What's new for C++ in Visual Studio 2017 href: ../overview/what-s-new-for-cpp-2017.md - - name: C++ Conformance improvements in Microsoft C/C++ (MSVC) + - name: C/C++ conformance improvements in Microsoft C++ (MSVC) Build Tools href: ../overview/msvc-conformance-improvements.md - name: C++ conformance improvements in Visual Studio 2022 href: ../overview/cpp-conformance-improvements.md From f51928bbcd32dfd12f9cc858193fe89e76269593 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Tue, 4 Nov 2025 10:49:57 -0800 Subject: [PATCH 15/18] tech review --- docs/overview/msvc-conformance-improvements.md | 10 +++++----- docs/overview/visual-cpp-language-conformance.md | 16 +++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index b9445b5ea91..3957ac7e613 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -172,7 +172,7 @@ Improved adherence to C++ standards includes better handling of attributes, temp ### C++20 and C++23 Features -- Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) +- Enhanced [multidimensional `operator[]` support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026) - Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731) ### Smaller conformance updates @@ -186,7 +186,7 @@ MSVC Build Tools v14.50 includes numerous smaller conformance improvements that - [CWG2507](https://cplusplus.github.io/CWG/issues/2507): Default arguments for `operator[]` support - [CWG2585](https://cplusplus.github.io/CWG/issues/2585): Behavior alignment with standard requirements - [CWG2521](https://cplusplus.github.io/CWG/issues/2521): Deprecation of 'operator string-literal identifier' -- [CWG2528](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2528): Relaxed conversion rules for the spaceship operator +- [CWG2528](https://cplusplus.github.io/CWG/issues/2528): Relaxed conversion rules for the spaceship operator - [P2360R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2360r0.html): Extended init-statement definition to allow alias-declarations - [P2290R3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2290r3.pdf): C++23 hexadecimal/octal delimited escape sequence support in string literals - [P2797R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2797r0.html): Resolution for CWG2692 regarding static and explicit object member functions with the same parameter-type-lists @@ -194,13 +194,13 @@ MSVC Build Tools v14.50 includes numerous smaller conformance improvements that ## Bug fixes -Bug fixes for C++ Modules, `constexpr`, and other fixes were made in MSVC v14.50. +Bug fixes for C++ Modules, `constexpr`, and other fixes were made in MSVC Build Tools v14.50. For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50). **Encoding of certain nontype template arguments corrected** -Affects `/stdc++20` or later. +Affects `/std:c++20` or later. Certain nontype pointer type template arguments involving subobjects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide. @@ -261,7 +261,7 @@ When upgrading to MSVC Build Tools v14.50, consider the following potential brea ## Provide feedback -For the latest updates and to provide feedback, visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). +For the latest updates and to provide feedback, visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [visualcpp@microsoft.com](mailto:visualcpp@microsoft.com). Follow us on X [@visualc](https://x.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social). If you encounter problems with MSVC in Visual Studio 2026, please let us know via the [Report a Problem](how-to-report-a-problem-with-the-visual-cpp-toolset.md) option, either from the installer or the Visual Studio IDE itself. diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index f77670f7701..5d3bdc12511 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -197,11 +197,9 @@ For details on conformance improvements, see [C++ conformance improvements in Vi |  [`P2173R1 Attributes on Lambda-Expressions`](https://wg21.link/p2173r1) | no | |  [`P2186R2 Remove Garbage Collection Support`](https://wg21.link/p2186r2) | VS 2022 17.0 [23](#note_23) | |  [`P2201R1 Mixed string literal concatenation`](https://wg21.link/p2201r1) | no | -|  [`P2266R1 Simpler implicit move`](https://wg21.link/p2266r1) | MSVC 14.50 [24](#note_24) | |  [`P2223R2 Trimming whitespaces before line splicing`](https://wg21.link/p2223r2) | no | |  [`P2242R3 Non-literal variables (and labels and gotos) in constexpr functions`](https://wg21.link/p2242r3) | no | |  [`P2246R1 Character encoding of diagnostic text`](https://wg21.link/p2246r1) | VS 2022 17.0 [23](#note_23) | -|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | no | |  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | no | |  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | no | |  [`P2295R6 Support for UTF-8 as a portable source file encoding`](https://wg21.link/p2295r6) | no | @@ -477,22 +475,22 @@ A more detailed listing of Standard Library features and bug fixes by product ve |  [`P2166R1 Prohibit basic_string and basic_string_view from being constructed from nullptr`](https://wg21.link/P2166R1) | VS 2022 17.0 [23](#note_23), [R](#note_R) | |  [`P2186R2 Removed garbage collection support`](https://wg21.link/P2186R2) | VS 2022 17.0 [23](#note_23), [Q](#note_Q) | |  [`P2251R1 Require span And basic_string_view To Be Trivially Copyable`](https://wg21.link/p2251r1) | VS 2022 17.1 [23](#note_23) | -|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 14.50 [24](#note_24) | +|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 19.50 [24](#note_24) | |  [`P2273R3 constexpr unique_ptr`](https://wg21.link/p2273r3) | VS 2022 17.3 [23](#note_23) | -|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 14.50 [24](#note_24) | -|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 14.50 [24](#note_24) | +|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 19.50 [24](#note_24) | +|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 19.50 [24](#note_24) | |  [`P2291R3 constexpr Integral `](https://wg21.link/p2291r3) | VS 2022 17.4 [23](#note_23) | |  [`P2302R4 ranges::contains, ranges::contains_subrange`](https://wg21.link/p2302r4) | VS 2022 17.4 [23](#note_23) | |  [`P2321R2 std::zip`](https://wg21.link/p2321r2) | partial in VS 2022 17.5 [23](#note_23) | |  [`P2322R6 ranges::fold_left, ranges::fold_right, etc.`](https://wg21.link/p2322r6) | VS 2022 17.5 [23](#note_23) | -|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 14.50 [24](#note_24) | +|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 19.50 [24](#note_24) | |  [`P2387R3 Pipe Support For User-Defined Range Adaptors`](https://wg21.link/p2387r3) | VS 2022 17.4 [23](#note_23) | |  [`P2393R1 Cleaning Up Integer-Class Types`](https://wg21.link/p2393r1) | VS 2022 17.2 [23](#note_23) | |  [`P2401R0 Conditional noexcept For exchange()`](https://wg21.link/p2401r0) | VS 2022 17.1 [23](#note_23) | |  [`P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms`](https://wg21.link/p2408r5) | VS 2022 17.4 [23](#note_23) | |  [`P2417R2 More constexpr bitset`](https://wg21.link/p2417r2) | VS 2022 17.4 [23](#note_23) | |  [`P2419R2 Clarify Handling Of Encodings In Localized Formatting Of chrono Types`](https://wg21.link/p2419r2) | VS 2022 17.4 [23](#note_23) | -|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 14.50 [24](#note_24) | +|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 19.50 [24](#note_24) | |  [`P2438R2 string::substr() &&`](https://wg21.link/p2438r2) | VS 2022 17.4 [23](#note_23) | |  [`P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right`](https://wg21.link/p2440r1) | VS 2022 17.4 [23](#note_23) | |  [`P2441R2 views::join_with`](https://wg21.link/p2441r2) | VS 2022 17.4 [23](#note_23) | @@ -577,7 +575,7 @@ A group of papers listed together indicates a Standard feature along with one or **VS 2022 17.3** Supported in Visual Studio 2022 version 17.3.\ **VS 2022 17.4** Supported in Visual Studio 2022 version 17.4.\ **VS 2022 17.5** Supported in Visual Studio 2022 version 17.5.\ -**MSVC 14.50** Supported in MSVC Compiler 14.50 and beyond. Support first shipped with Visual Studio 2026 18.0. +**MSVC 19.50** Supported in MSVC Compiler 19.50 and beyond. Support first shipped with Visual Studio 2026 18.0. ### Notes @@ -648,7 +646,7 @@ These algorithms aren't presently parallelized: **23** In Visual Studio 2022 version 17.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. - **24** In MSVC 14.50 and up, first shipped with Visual Studio 2026 version 18.0, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. + **24** In MSVC 19.50 and up, first shipped with Visual Studio 2026 version 18.0, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. **C11** Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](./install-c17-support.md). From d37dabd62f18579702b1d0735d7cf8c0ace32a10 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Tue, 4 Nov 2025 11:06:34 -0800 Subject: [PATCH 16/18] edit --- docs/overview/visual-cpp-language-conformance.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 5d3bdc12511..28ed3a00834 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -475,7 +475,6 @@ A more detailed listing of Standard Library features and bug fixes by product ve |  [`P2166R1 Prohibit basic_string and basic_string_view from being constructed from nullptr`](https://wg21.link/P2166R1) | VS 2022 17.0 [23](#note_23), [R](#note_R) | |  [`P2186R2 Removed garbage collection support`](https://wg21.link/P2186R2) | VS 2022 17.0 [23](#note_23), [Q](#note_Q) | |  [`P2251R1 Require span And basic_string_view To Be Trivially Copyable`](https://wg21.link/p2251r1) | VS 2022 17.1 [23](#note_23) | -|  [`P2266R3 Simpler implicit move`](https://wg21.link/p2266r3) | MSVC 19.50 [24](#note_24) | |  [`P2273R3 constexpr unique_ptr`](https://wg21.link/p2273r3) | VS 2022 17.3 [23](#note_23) | |  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 19.50 [24](#note_24) | |  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 19.50 [24](#note_24) | From 494e814a7fdf373217d9e4d2564a3554657f185c Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Tue, 4 Nov 2025 12:51:04 -0800 Subject: [PATCH 17/18] nit --- docs/overview/msvc-conformance-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/msvc-conformance-improvements.md b/docs/overview/msvc-conformance-improvements.md index 3957ac7e613..e9f57255dfa 100644 --- a/docs/overview/msvc-conformance-improvements.md +++ b/docs/overview/msvc-conformance-improvements.md @@ -1,5 +1,5 @@ --- -title: "C/C++ conformance improvements in Microsoft C++ (MSVC) Build Tools" +title: "/C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C++ (MSVC) Build Tools" description: "Summary of conformance improvements in Microsoft C/C++ (MSVC)" ms.date: 11/03/2025 ms.service: "visual-cpp" From bddf26c556b34d63af5c777b7650c95b9e308be4 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Tue, 4 Nov 2025 13:58:42 -0800 Subject: [PATCH 18/18] edit --- docs/overview/visual-cpp-language-conformance.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 28ed3a00834..d1414adf473 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -1,7 +1,7 @@ --- title: "Microsoft C/C++ language conformance" description: "Microsoft C and C++ conformance updates by Visual Studio version." -ms.date: 11/03/2025 +ms.date: 11/04/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- @@ -476,20 +476,20 @@ A more detailed listing of Standard Library features and bug fixes by product ve |  [`P2186R2 Removed garbage collection support`](https://wg21.link/P2186R2) | VS 2022 17.0 [23](#note_23), [Q](#note_Q) | |  [`P2251R1 Require span And basic_string_view To Be Trivially Copyable`](https://wg21.link/p2251r1) | VS 2022 17.1 [23](#note_23) | |  [`P2273R3 constexpr unique_ptr`](https://wg21.link/p2273r3) | VS 2022 17.3 [23](#note_23) | -|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC 19.50 [24](#note_24) | -|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC 19.50 [24](#note_24) | +|  [`P2280R4 Using unknown pointers and references in constant expressions`](https://wg21.link/p2280r4) | MSVC Build Tools version 14.5 [24](#note_24) | +|  [`P2290R3 Delimited escape sequences`](https://wg21.link/p2290r3) | MSVC Build Tools version 14.5 [24](#note_24) | |  [`P2291R3 constexpr Integral `](https://wg21.link/p2291r3) | VS 2022 17.4 [23](#note_23) | |  [`P2302R4 ranges::contains, ranges::contains_subrange`](https://wg21.link/p2302r4) | VS 2022 17.4 [23](#note_23) | |  [`P2321R2 std::zip`](https://wg21.link/p2321r2) | partial in VS 2022 17.5 [23](#note_23) | |  [`P2322R6 ranges::fold_left, ranges::fold_right, etc.`](https://wg21.link/p2322r6) | VS 2022 17.5 [23](#note_23) | -|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC 19.50 [24](#note_24) | +|  [`P2360R0 Extend init-statement to allow alias-declaration`](https://wg21.link/p2360r0) | MSVC Build Tools version 14.5 [24](#note_24) | |  [`P2387R3 Pipe Support For User-Defined Range Adaptors`](https://wg21.link/p2387r3) | VS 2022 17.4 [23](#note_23) | |  [`P2393R1 Cleaning Up Integer-Class Types`](https://wg21.link/p2393r1) | VS 2022 17.2 [23](#note_23) | |  [`P2401R0 Conditional noexcept For exchange()`](https://wg21.link/p2401r0) | VS 2022 17.1 [23](#note_23) | |  [`P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms`](https://wg21.link/p2408r5) | VS 2022 17.4 [23](#note_23) | |  [`P2417R2 More constexpr bitset`](https://wg21.link/p2417r2) | VS 2022 17.4 [23](#note_23) | |  [`P2419R2 Clarify Handling Of Encodings In Localized Formatting Of chrono Types`](https://wg21.link/p2419r2) | VS 2022 17.4 [23](#note_23) | -|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC 19.50 [24](#note_24) | +|  [`P2437R1 Support for #warning`](https://wg21.link/p2437r1) | MSVC Build Tools version 14.50 [24](#note_24) | |  [`P2438R2 string::substr() &&`](https://wg21.link/p2438r2) | VS 2022 17.4 [23](#note_23) | |  [`P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right`](https://wg21.link/p2440r1) | VS 2022 17.4 [23](#note_23) | |  [`P2441R2 views::join_with`](https://wg21.link/p2441r2) | VS 2022 17.4 [23](#note_23) | @@ -574,7 +574,7 @@ A group of papers listed together indicates a Standard feature along with one or **VS 2022 17.3** Supported in Visual Studio 2022 version 17.3.\ **VS 2022 17.4** Supported in Visual Studio 2022 version 17.4.\ **VS 2022 17.5** Supported in Visual Studio 2022 version 17.5.\ -**MSVC 19.50** Supported in MSVC Compiler 19.50 and beyond. Support first shipped with Visual Studio 2026 18.0. +**MSVC Build Tools version 14.50** Supported in Visual Studio 2026 18.0 (MSVC compiler version 19.50) and up. ### Notes @@ -645,7 +645,7 @@ These algorithms aren't presently parallelized: **23** In Visual Studio 2022 version 17.0 and up, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. - **24** In MSVC 19.50 and up, first shipped with Visual Studio 2026 version 18.0, these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. + **24** In MSVC Build Tools version 14.50 and up (first shipped with Visual Studio 2026 version 18.0), these features are enabled by the [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) compiler option. **C11** Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](./install-c17-support.md).