C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
An alternative to __if_exists in ATL
What are and The and keywords in the Active Template Library (ATL) allow a user to test at compile time whether an identifier exists. If the identifier exists, the associated statement block is executed. and can be applied to the names of variables, functions, typedefs, as well as other identifiers. You can read more about the specifics of their use and potential pitfalls on MSDN, and in Raymond Chen’s blogpost about the keywords. Why you shouldn’t use or Although these keywords seem like they’d be useful, they’ve been problematic for years. Also, and are also incompatible with the recommended comp...
View files on your Remote Machines using the new Remote File Explorer in Visual Studio
We are excited to announce that we have added a new tool window, the Remote File Explorer, to Visual Studio in version 17.6 Preview 1. This window provides you with the ability to browse, upload, and download files and folders on your remote machines that you are connected to via the Connection Manager within your Visual Studio instance. How do I access the Remote File Explorer? To access the Remote File Explorer, download the latest version of Visual Studio and ensure “Remote File Explorer for Linux” is checked under the optional downloads in the Linux and embedded development with C++ toolset: ...
CMake debugger allows you to debug your CMake scripts and more
The VS CMake team has been working in close collaboration with Kitware on developing a debugger for CMake scripts in the Visual Studio IDE (see this open Kitware issue for more details). We will be contributing this work back upstream (targeting the 3.27 release) so that the developer community can have it and work to improve it together, by adding new features and support for additional DAP capabilities. We are excited to announce that a preview of the CMake debugger is now available to debug your CMake scripts and CMakeLists.txt file for any CMake project in Visual Studio 17.6 Preview 1. To initiate a ...
Visual Studio 2022 version 17.5 for C++ Developers
We are happy to announce that Visual Studio 2022 version 17.5 is now generally available! This post summarizes the new features you can find in this release for C++. See the Visual Studio 17.5 announcement to learn about all of the features in the release. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Contents Arm64 In 17.3 you could use Visual Studio as a native Arm64 application. In 17.4 you could use our native Arm64 toolchain in production. Continuing our progress, in 17.5 you can now obtain a native ...
Unreal Engine Integrations Now Available in Visual Studio 2022
Since the release of Visual Studio 2022, we have been focusing on building a cascade of productivity and performance improvements for game and large project developers. Today, we are happy to share the next set of features specifically aimed towards improving productivity for Unreal Engine development. We have heard and seen a tremendous amount of valuable feedback from you, our game developers. We want to give a special shoutout to all who participated in surveys, left Developer Community suggestions, and chatted with us on social media. These features wouldn’t have been possible without you. In this blog...
Minecraft’s WSL build time cut in half after working with Visual Studio C++ team
The Minecraft Publishing team, within Mojang Studios, reached out to the Visual Studio C++ team because they needed to expand C++ development to a new platform (Linux) while respecting their existing technological base (MSBuild) and these constraints prevented them from pursuing more established cross-platform pipelines. When developing with these technical constraints, they were experiencing issues with extremely slow full rebuild times on WSL (40-50 minutes!) and remote Linux systems with MSBuild. For reference, the same rebuild would take around 20 minutes for Windows. The Visual Studio C++ team met with them...
Remote Native Unit Test Support in Visual Studio
Remote C++ unit testing enables developers to connect Visual Studio 2022 to remote windows environments for running and debugging C++ desktop application tests. This functionality is useful for developers who deploy code to different Windows target environments such as different Windows architectures. With this feature, you can run tests on your target machine right from Visual Studio by connecting the Test Explorer to a remote environment. How to Setup for Native Remote Unit Testing Prepare the Remote Windows Machine 1. Ensure Windows Projected File System is enabled. You can run the following from an admin P...
VS Code C++ Extension January Update: Create Definitions and Declarations
Starting with the 1.13.6 version of the C++ Extension in VS Code, we are happy to share a much requested feature: Auto creation of definitions or declarations for functions! You can now quickly create a declaration in a header file for a function you only have a definition for, or vice versa. These generated definitions and declarations already include all function arguments, so no need for constant copying, pasting, and double checking. Let’s see it in action: How can I create a Definition or Declaration? You can either: How do I know where the definition or de...
Debug Linux Console apps in Visual Studio’s Integrated Terminal
We have now added the capability for users to debug their C++ Linux Console applications from the Integrated Terminal in Visual Studio 2022 17.5 Preview 3! To learn more about what the Integrated Terminal does and how to work with it in Visual Studio, please see this C++ feature announcement blog post. Now, using the Linux Console embedded in the Integrated Terminal, Visual Studio supports a fully functional terminal-like experience when debugging Linux applications. This new Linux Console emulates an xterm and can support application screen manipulation; for example, writing screen formatting control charact...