C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
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...
C++ Brace Pair Colorization and More in Visual Studio
Visual Studio 17.5 brings you several new improvements in the C++ editing experience. Now we are excited to announce that C++ Brace Pair Colorization, Spell Checker, All-In-One Search, Reimagined Member List, and Macro Expansion Improvements are released in the Visual Studio Preview. These features are also part of our focus on increasing game development productivity. Look out for a dedicated post coming soon. To start using the features, make sure to update to the latest version of Visual Studio Preview. Brace Pair Colorization for C++ You can now visually distinguish each set of opening and closin...
Deploy and debug apps on remote targets
There are a number of ways that Visual Studio and Visual Studio Code enable you to interact with remote machines. Both can enable you to connect to a remote machine and use it as a build machine and debug your applications there. Sometimes though your target is not the same as your build machine. For example, for embedded Linux devices you will likely want to cross compiler the application on a more powerful build machine then deploy to the device for debugging. This post is going to demonstrate how to build an application locally in a Dev Container for either a Raspberry Pi 3 or 4, then deploy and debug the appl...
vcpkg 2023.01.09 Release: Registry Pattern Matching, Documentation Changes, and More…
The 2023.01.09 release of the vcpkg package manager is available. This blog post summarizes changes from November 15th, 2022 to January 9th, 2023 for the Microsoft/vcpkg and Microsoft/vcpkg-tool GitHub repos. Some stats for this period: Notable Changes Notable changes for this release are summarized below. Registries now support pattern matching when declaring packages Based on user feedback, we have added a feature that enables limited pattern matching for packages declared in registries. We now allow prefixes followed by a * character. The * character is a wi...
vcpkg Documentation Moves to Microsoft Docs Platform
vcpkg Documentation Moves to Microsoft Docs Platform As of today, the vcpkg documentation has a new home at https://learn.microsoft.com/vcpkg. This is the platform that most Microsoft documentation is hosted on and comes with many features that make it easier to search, navigate, author, and review documentation. All current vcpkg articles are now visible on the new platform. We are still in the process of removing the documentation from other locations (vcpkg.io, the main vcpkg GitHub repo, and vcpkg.readthedocs.io). We will add redirects where possible to the new home for the docs to avoid breaking existing ...
Standards conformance improvements to /Gw in Visual Studio version 17.5 Preview 2
The /Gw switch enables the linker to optimize global data to reduce binary size. As part of the 17.5 Preview 2 release a new flag, , has been added to improve C++ standards conformance when using . Previously, when using , certain One Definition Rule (ODR) violations were being ignored and would not cause an error. The new flag ensures that we do raise the appropriate errors. If you are currently using we recommend setting on your builds, as it’s currently off by default. This may change in a future major update. For a more detailed explanation of ODR, , and how this issue came about, read on below. Let’s go...