C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

C++ code editing tools for GitHub Copilot: now in Public Preview
Dec 16, 2025
Post comments count 3
Post likes count 4

C++ code editing tools for GitHub Copilot: now in Public Preview

Sinem Akinci
Sinem Akinci

In November, we introduced C++ code editing tools for GitHub Copilot as a Private Preview, focusing on partnering with customers to tackle one of the common, taxing challenges for C++ development: refactoring at scale. Since then, we've listened to feedback and refined our tooling to make wide-sweeping C++ edits easier. "With C++ code editing tools for GitHub Copilot in Visual Studio, we've seen noticeably better overall results, with fewer errors and faster processing on large projects." - Software engineer (from our Private Preview) We're excited to announce that C++ code editing tools for GitHub Copilot are ...

New release cadence and support lifecycle for Microsoft C++ Build Tools
Nov 24, 2025
Post comments count 19
Post likes count 2

New release cadence and support lifecycle for Microsoft C++ Build Tools

Marian Luparu
Marian Luparu

Starting with Visual Studio 2026, we are introducing a new support lifecycle for the Microsoft C++ (MSVC) Build Tools. We are also updating the MSVC release cadence. As Visual Studio moves to a Modern Lifecycle with monthly feature updates and an annual new version, decoupling the compiler from the IDE offers you the best of both worlds – rapid iteration in the IDE and predictable, long-term stability for the build tools. This approach brings you the latest C++ advancements across both IDE and build tools while helping you maintain secure and compliant build environments, with enterprise-grade support, and fle...

Introducing MSVC AddressSanitizer for ARM64 targets
Nov 17, 2025
Post comments count 1
Post likes count 2

Introducing MSVC AddressSanitizer for ARM64 targets

Zachary Johnson
Zachary Johnson

We are pleased to announce AddressSanitizer (ASan) support for the Microsoft C++ (MSVC) Build Tools for ARM64 targets. ASan is a runtime memory error detector that identifies difficult-to-find bugs with zero false positives and improves memory safety. More technical information on ASan can be found at aka.ms/asan.  ASan has long supported the x64 and x86 architectures. With the release of Visual Studio 2026 for production use, this support now extends to ARM64. The feature is currently in preview, so there may be build, runtime, or IDE integration issues. Cross-compiling for ARM64 targets from x86 or x64 hosts...

Perform wide-sweeping refactors using C++ code editing tools for GitHub Copilot
Nov 12, 2025
Post comments count 0
Post likes count 1

Perform wide-sweeping refactors using C++ code editing tools for GitHub Copilot

Sinem Akinci
Sinem Akinci

Refactoring a C++ codebase can often require tracking updates across various sections of multiple files to ensure accuracy and relevancy.  Historically, developers have relied on manual searches across a codebase and refactoring tools to perform these types of edits. However, with GitHub Copilot agents, developers can now delegate these complex editing tasks to the agent, which understands your intent and can carry out codebase-wide edits, reducing the manual effort required to perform these refactors. To make this experience even more powerful for C++ developers, we’re introducing C++ Code Editing Tools f...

Optimize Your C++ Build Times with GitHub Copilot
Nov 12, 2025
Post comments count 2
Post likes count 2

Optimize Your C++ Build Times with GitHub Copilot

David Li
David Li

Long build times are one of the top pain points for C++ projects. If you’ve ever waited too long for a C++ build to finish, you know how much it can slow down your productivity. In past years, we introduced C++ Build Insights to help you analyze traces and find bottlenecks. However, we know that embarking on these investigations manually can still take time and effort. To make this experience easier for C++ developers, we’re excited to announce that GitHub Copilot build performance for Windows is now available in Private Preview with the latest version of Visual Studio 2026 Insiders. New GitHub Copilot Ca...

Fix build issues using GitHub Copilot after upgrading MSVC Build Tools
Nov 12, 2025
Post comments count 5
Post likes count 0

Fix build issues using GitHub Copilot after upgrading MSVC Build Tools

Michael Price
Michael Price

A few problems have reared their heads at every company where I’ve worked on C++ as a Software Engineer over the past 20 years. For the most part, those problems have nothing to do with the language and how it is used, but instead all the “other” stuff, like dealing with long build times, getting consistent build environments, and managing the technical debt of an evolving tooling landscape. When the tools we use to build our applications and systems have new releases, we must make hard decisions. Do we adopt the latest and greatest and turn potential technical debt into realized technical debt, or do we e...

What’s New for C++ Developers in Visual Studio 2026 version 18.0
Nov 11, 2025
Post comments count 6
Post likes count 4

What’s New for C++ Developers in Visual Studio 2026 version 18.0

Augustin Popa
Augustin Popa

Get ready to level up your C++ productivity, because Visual Studio 2026 version 18.0 is now generally available! You can take advantage of the new features, bug fixes, and performance improvements in your production environment. This post describes what’s new for C++ developers, including new features or improvements in these areas: You can also read the broader announcement on the Visual Studio Blog for more details on changes that are non-C++-specific. Let’s dive in! Your feedback matters to us You can always give us feedback abo...

Inside Visual Studio: Improving Open-Source Workflows with vcpkg
Nov 6, 2025
Post comments count 1
Post likes count 1

Inside Visual Studio: Improving Open-Source Workflows with vcpkg

Eve Silfanus
Eve Silfanus

vcpkg, an open-source C/C++ package manager maintained by Microsoft, is increasingly recognized as a leading dependency management solution. As an enterprise-grade tool, it enables organizations to streamline library imports, reduce duplication, and support flexible, reproducible builds across a wide array of environments. This need for streamlined dependency management is especially relevant in the build system for the Visual Studio repository. This system not only supports the development of Visual Studio itself but also integrates decades of legacy infrastructure, specialized tools, and complex architecture...

What’s New in vcpkg (October 2025)
Nov 4, 2025
Post comments count 1
Post likes count 0

What’s New in vcpkg (October 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.10.17 registry release, the 2025-10-10 and 2025-10-16 tool releases, as well as changes to vcpkg documentation throughout October. This month’s updates includes partial support for Visual Studio 2026 and platform toolset v145, NetBSD platform support, and minor improvements and bug fixes. Some stats for this period: vcpkg changelog (2025.10.17 release) Documentation changes Over the past month we had minor documentation improvements. If you have any suggestions for our documentation, pl...

Microsoft C++ Team at CppCon 2025: Trip Report
Oct 31, 2025
Post comments count 3
Post likes count 1

Microsoft C++ Team at CppCon 2025: Trip Report

Michael Price
Michael Price

Another year and another CppCon is all wrapped up! Microsoft was pleased to once again be an exhibitor and to have several of our employees present sessions at the conference. Here are my major takeaways from the keynotes, sessions, conversations, and the general vibe. The week before CppCon, we announced Visual Studio 2026 and Microsoft C++ (MSVC) Build Tools v14.50, and the conference gave us a great opportunity to let you know what you can expect in the new release and for you to give us your feedback. We highly encourage you to try out the Insiders release and let us know what your experience...

Upgrading C++ Projects to Visual Studio 2026
Oct 30, 2025
Post comments count 6
Post likes count 5

Upgrading C++ Projects to Visual Studio 2026

Augustin Popa
Augustin Popa

With Visual Studio 2026 version 18.0 getting closer to General Availability (GA), we want to share with you how you can upgrade your projects from your current versions of Visual Studio and the Microsoft C++ (MSVC) Build Tools to the latest versions. The new IDE ships with the v145 platform toolset for MSBuild C++ projects and MSVC Build Tools version 14.50. In this post, I will walk you through the process step-by-step, while explaining some of the features available to you to make the transition as painless as possible. Overall, our goal is to help you get current and stay current. You can also review the updat...

New GitHub Copilot capabilities for C++ developers: Upgrade MSVC, improve build performance, and refactor C++ code
Oct 29, 2025
Post comments count 0
Post likes count 3

New GitHub Copilot capabilities for C++ developers: Upgrade MSVC, improve build performance, and refactor C++ code

Erika Sweet
Erika Sweet

Yesterday at GitHub Universe, GitHub announced support for custom agents. Custom agents are specialized configurations with custom prompts and context that focus Copilot on specific development tasks. On the C++ team, we have a similar goal: Provide differentiated capabilities that optimize GitHub Copilot for C++ development tasks. As a first step towards this goal, we’re announcing new capabilities for GitHub Copilot that support C++ developers in three development tasks: These experiences will be available soon as a Private Preview in Visual Studio 2026. Join the waitlist for Private Pr...

What’s New in vcpkg (September 2025)
Oct 2, 2025
Post comments count 3
Post likes count 0

What’s New in vcpkg (September 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.09.17 registry release, the 2025-08-29 and 2025-09-03 tool releases, as well as changes to vcpkg documentation throughout September. This month’s updates includes new binary caching sources and , support for tvOS and watchOS target platforms, and minor improvements and bug fixes. Some stats for this period: vcpkg changelog (2025.09.17 release) Documentation changes If you have any suggestions for our documentation, please submit an is...

Fixing Overload Resolution For Parameter Arrays in C++/CLI
Sep 29, 2025
Post comments count 0
Post likes count 2

Fixing Overload Resolution For Parameter Arrays in C++/CLI

Tanveer Gani
Tanveer Gani

Fix a problem in C++/CLI parameter array overload resolution which affects newer .NET versions.

Microsoft C++ Team at CppCon 2025
Sep 11, 2025
Post comments count 0
Post likes count 1

Microsoft C++ Team at CppCon 2025

Michael Price
Michael Price

  It's that time of year again! We are excited to see you all at CppCon this year, where we'll once again be delivering a variety of presentations, from the latest advancements in debugging technology to extensibility frameworks for AI agents. See the end of this post for a listing of all of the sessions involving Microsoft staff. And yes, there'll be plenty of information on the freshly announced Visual Studio 2026. We'll also have a booth through the first four days of the conference. Come on by and let us know what matters to you or ask any burning questions you may have regarding C++ at Microso...

C++ Language Updates in MSVC Build Tools v14.50
Sep 10, 2025
Post comments count 9
Post likes count 7

C++ Language Updates in MSVC Build Tools v14.50

Cameron DaCamara
Cameron DaCamara

C++ Language Updates in MSVC Build Tools v14.50 It has been some time since we have provided an update on MSVC progress, and this one comes with the latest major update to our IDE: Visual Studio 2026 version 18.0. This version of Visual Studio ships with the MSVC Build Tools version 14.50, which includes version 19.50 of the MSVC compiler. You can try out the improvements by downloading the Insiders release. Also, if you want to track updates in the Standard Library, check out the STL Changelog, which is regularly updated. Let’s jump right into the updates! C++23 Features As C++ standards progress in MSVC, you...

Visual Studio 2026 Insiders is here!
Sep 10, 2025
Post comments count 45
Post likes count 7

Visual Studio 2026 Insiders is here!

Augustin Popa
Augustin Popa

Get ready –the first Insiders release of Visual Studio 2026 has arrived! In this new evolution of Visual Studio, we’re continuing our commitment to building the best integrated developer environment for C++ developers on Windows. Visual Studio 2026 features a fresh UI, faster performance, and improved developer productivity with advanced AI integration. For more details on what’s new, check out the official announcement on the Visual Studio Blog! We would love your feedback – try out our Insiders release of Visual Studio 2026 today! If you run into any issues, you can report them to Visual Studio Dev...

What’s New in vcpkg (August 2025)
Sep 5, 2025
Post comments count 0
Post likes count 0

What’s New in vcpkg (August 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.08.27 registry release as well as changes to vcpkg documentation throughout August. There were no tool changes as of the date of the registry release in August, though more changes will be listed in the next release in September. Some stats for this period: GitHub Dependabot support for vcpkg Earlier this month, we announced GitHub Dependabot support for vcpkg. This allows GitHub users to receive automated PRs to upgrade their vcpkg versioning baselines. Since that announcement, the automated PRs have b...

Announcing Proxy 4: The Next Leap in C++ Polymorphism
Aug 19, 2025
Post comments count 5
Post likes count 5

Announcing Proxy 4: The Next Leap in C++ Polymorphism

Mingxin Wang
Mingxin Wang

Version 4 of Microsoft's Proxy library brings feature improvements, better diagnostics, better code generation, modern compiler/debugger support.

Dependabot support for vcpkg
Aug 18, 2025
Post comments count 3
Post likes count 3

Dependabot support for vcpkg

Jamie Magee
Jamie Magee

We are excited to announce that GitHub’s Dependabot now brings automated dependency updates to C++ projects using vcpkg. This support is available for projects using vcpkg manifest files, empowering teams to keep their library dependencies current and secure with minimal effort. With Dependabot, your repo can receive automatic pull requests to upgrade your libraries to the latest available versions. What does this mean for your projects? For C++ developers managing dependencies through vcpkg, this integration eliminates a critical gap in the DevSecOps pipeline. Dependabot will automatically scan your manifests...

What’s New in vcpkg (July 2025)
Aug 5, 2025
Post comments count 0
Post likes count 0

What’s New in vcpkg (July 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.07.25 registry release, 2025-06-20, 2025-07-16, and 2025-07-21 tool releases, as well as changes to vcpkg documentation throughout July. This release includes a new command for printing package SPDX licenses, binary caching optimizations, and support for visionOS, Solaris, and illumos systems. Some stats for this period: vcpkg changelog (2025.07.25 release) The following notable changes were made in this release: Documentation changes If you have any suggestions for...

Dynamically Update C++ syntax using Next Edit Suggestions
Aug 4, 2025
Post comments count 0
Post likes count 1

Dynamically Update C++ syntax using Next Edit Suggestions

Sinem Akinci
Sinem Akinci

When working in a C++ repo, you often are maintaining and updating existing code just as often as you are writing new code. However, updating code in C++ can often require navigating to several different locations in a file to ensure consistency, which can disrupt your logical workflow. For example, changing a data member’s access level typically involves several steps: moving the member between the and sections of the class, adding getter/setter methods, and updating all references to respect this new access level. GitHub Copilot now supports Next Edit Suggestions (or NES for short) to predict the next edit...

Visual Studio Code CMake Tools Extension 1.21 Release: Multi-root improvements, CMake Presets v10, and more…
Jul 21, 2025
Post comments count 0
Post likes count 0

Visual Studio Code CMake Tools Extension 1.21 Release: Multi-root improvements, CMake Presets v10, and more…

Sinem Akinci
Sinem Akinci

We’re excited to announce the latest 1.21 release of the CMake Tools extension for Visual Studio Code. This update brings a host of new updates, including addressing one of our top-voted issues for multi-root improvements and adding CMake presets version 10 support. To view the full list of updates with this release, please look at our CHANGELOG. This release features the following ten contributions from our open-source community. Thank you for your continued support! Multi-root improvements We addressed one of our top-voted customer feedback issues to improve mult...

Updates to Warning Suppressions in Microsoft C++ Code Analysis
Jul 15, 2025
Post comments count 2
Post likes count 1

Updates to Warning Suppressions in Microsoft C++ Code Analysis

Carson Radtke
Carson Radtke

Improvements to \#pragma warning and gsl::suppress in Microsoft C++ Code Analysis.

Smarter, workspace-aware code completions for C++ in VS Code
Jul 8, 2025
Post comments count 0
Post likes count 0

Smarter, workspace-aware code completions for C++ in VS Code

Sinem Akinci
Sinem Akinci

C++ code understanding Developing C++ code can be complex. C++ project structure, style, and convention can vary widely from repository to repository, and critical context for a given task often spans multiple files. This can require C++ developers to open and navigate across several files to fully understand a given project and author new code. The GitHub Copilot team has focused on two areas to improve the C++ developer experience for code completions: These improvements are designed to help the autocomplete-style inline GitHub Copilot code completions be even more productive with C++ coding, m...

What’s New in vcpkg (June 2025)
Jul 4, 2025
Post comments count 0
Post likes count 1

What’s New in vcpkg (June 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.06.13 registry release, 2025-04-16, 2025-05-19, and 2025-06-02 tool releases, as well as changes to vcpkg documentation throughout May and June. This release includes bug fixes, several documentation changes, and the removal of the binary caching provider for GitHub (alternatives are described below). Some stats for this period: vcpkg changelog (2025.06.13 release) The following notable changes were made in this release: Documentation changes ...

How Electronic Arts standardized C++ builds across Windows and Linux with Visual Studio Build Tools
Jun 26, 2025
Post comments count 0
Post likes count 0

How Electronic Arts standardized C++ builds across Windows and Linux with Visual Studio Build Tools

Sinem Akinci
Sinem Akinci

At Electronic Arts (EA), the Frostbite Enginering Workflows team has thousands of developers who work on powerful game engines behind popular games.  EA has relied on Visual Studio for years due to several features such as IntelliSense, Build Insights, and the overall debugging experience and eagerly use newer integrations such as GitHub Copilot.  They also use Visual Studio capabilities for their cross-platform development needs. We're proud to partner with EA to shape cross-platform development capabilities in Visual Studio. Read more in the full story about how we worked with EA to enable them to customize ...

Address Sanitizer Updates for Visual Studio 2022 Version 17.14
May 27, 2025
Post comments count 6
Post likes count 1

Address Sanitizer Updates for Visual Studio 2022 Version 17.14

David Justo
David Justo

Introduction It has been an exciting few months for the Address Sanitizer (ASan) since our last update. In addition to our continuous focus on quality and correctness, our internal “dogfooding” (i.e. internal adoption) effort has reached several important milestones. In this update, I want to go over some of the quality improvements since Visual Studio 2022 version 17.13, and to give a peek into how ASan is now protecting our C++ toolset against memory safety errors during development. Some improvements in Visual Studio 2022 version 17.14 This release also contains several other impr...

What’s New for C++ Developers in Visual Studio 2022 17.14
May 13, 2025
Post comments count 2
Post likes count 2

What’s New for C++ Developers in Visual Studio 2022 17.14

Sy Brand
Sy Brand

Visual Studio 2022 version 17.14 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library and Compiler We’ve made a myriad of fixes and improvements to the MSVC compiler and standard library. See C++ Language Updates in MSVC in Visual Studio 2022 17.14 for a full list of changes on the compiler side, and the STL Changelog for all the standard library updates. Compiler We’ve added support...

Introducing the /forceInterlockedFunctions switch for ARM64
May 13, 2025
Post comments count 0
Post likes count 3

Introducing the /forceInterlockedFunctions switch for ARM64

Emily Bao
Emily Bao

In Visual Studio 2022 17.14, we are introducing the switch, which generates and links with out-of-line atomics that select Armv8.1+ Large System Extension (LSE) atomic instructions based on CPU support. This switch is on by default for Armv8.0 and off for Armv8.1+. Outlining is necessary in Armv8.0 because this version's interlocked intrinsics use exclusive instructions—/—that do not guarantee forward progress. This can cause performance issues due to intermittent livelocks. See Arm Architecture Reference Manual for A-profile architecture, section "B2.17.5 Load-Exclusive and Store-Exclusive instruction usage ...

C++ Language Updates in MSVC in Visual Studio 2022 17.14
May 6, 2025
Post comments count 1
Post likes count 5

C++ Language Updates in MSVC in Visual Studio 2022 17.14

Cameron DaCamara
Cameron DaCamara

Introduction In this update, we continue the tradition of bucketing bugs into helpful categories for you all to filter through along with even more notes from the compiler team as to what, exactly, was fixed. This blog is also complemented by the recent Pure Virtual C++ pre-conference talk by RanDair Porter; so please check out RanDair's talk, "MSVC C++23 Conformance", if you have not already to get a better view of MSVC's conformance status for Visual Studio 2022 overall. 17.13 notes for reference. C++23 Features Note: C++23 features can be used by either adding or to the command line. In addition, feat...

What’s New in vcpkg (April 2025)
May 2, 2025
Post comments count 1
Post likes count 0

What’s New in vcpkg (April 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.04.09 registry release, 2025-03-22, 2025-04-01, and 2025-04-07 tool releases, as well as changes to vcpkg documentation throughout April. This release contains bug fixes, a new documentation article on offline usage of vcpkg, and other minor improvements. Arm64 Linux users of vcpkg also no longer have to build the vcpkg tool from source when they install vcpkg. Some stats for this period: vcpkg changelog (2025.04.09 release) The following notable changes were made in April: ...

There’s a Linux File Explorer built into Visual Studio!?!
May 1, 2025
Post comments count 1
Post likes count 1

There’s a Linux File Explorer built into Visual Studio!?!

Sinem Akinci
Sinem Akinci

The Remote File Explorer in Visual Studio provides developers with a convenient way to browse, view, and edit files on remote machines—directly from within the IDE. It's a powerful tool for managing remote environments without leaving your development workflow. Scott Hanselman published a new YouTube video to his channel, taking us on the journey of discovering and using the Remote File Explorer to interact with his personal PiDP-11 through shell scripts stored on the minicomputer. Check out Scott’s video and his thoughts about using the Remote File Explorer below: Using the Remote File Explorer and re...

VS Code C++ Extension 1.25 Release:  Explain C++ symbols using Copilot & Customize recursive include paths
Apr 30, 2025
Post comments count 0
Post likes count 3

VS Code C++ Extension 1.25 Release: Explain C++ symbols using Copilot & Customize recursive include paths

Alexandra Kemper Sinem Akinci
Alexandra,
Sinem

The 1.25 release of the C++ extension in Visual Studio Code introduces a new way to understand your code faster with GitHub Copilot-powered symbol summaries, as well as new customization options for recursive #include path processing. With these enhancements, you gain AI-powered insights into unfamiliar or undocumented code and can optimize IntelliSense performance based on your preferences.   Experience these new features for yourself by updating to version 1.25.   Copilot Hover Want to understand your unfamiliar codebases like undocumented library code quicker without having to navigate around files and re...

Pure Virtual C++ 2025 is Tomorrow
Apr 29, 2025
Post comments count 0
Post likes count 0

Pure Virtual C++ 2025 is Tomorrow

Sy Brand
Sy Brand

Pure Virtual C++ is our free, one-day, virtual conference for the whole C++ community. It's running live tomorrow, 30th April, from 14:00 to 16:30 UTC. The talks are: We also have a host of pre-conference content available on YouTube. We look forward to seeing you there!

Pure Virtual C++ 2025: Pre-Conference Videos
Apr 23, 2025
Post comments count 0
Post likes count 0

Pure Virtual C++ 2025: Pre-Conference Videos

Sy Brand
Sy Brand

Pure Virtual C++ is our free, one-day, virtual conference for the whole C++ community. It is running on 30th April. The first half of our pre-conference videos is now available on YouTube. The videos are: We look forward to seeing you at Pure Virtual C++!

Pure Virtual C++ 2025: Full Schedule
Apr 15, 2025
Post comments count 0
Post likes count 3

Pure Virtual C++ 2025: Full Schedule

Sy Brand
Sy Brand

Pure Virtual C++ is our free, one-day, virtual conference for the whole C++ community. This year, it is running on the 30th April. We're pleased to announce the schedule of live talks: You can find abstracts for all the talks and register for the conference with the button below. Keep an eye out for on-demand pre-conference content coming soon on YouTube.

What’s New in vcpkg (March 2025)
Apr 8, 2025
Post comments count 1
Post likes count 1

What’s New in vcpkg (March 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.03.19 registry release, 2025-03-13 tool release, as well as changes to vcpkg documentation throughout March. This release includes two new commands for our continuous integration system PR reviews, minor bugfixes, a new documentation article on authenticating to NuGet feeds, and a few other minor documentation fixes. Some stats for this period: vcpkg changelog (2025.03.19 release) The following notable changes were made in March: Documentation changes ...

Pure Virtual C++ 2025 Talks Announced
Apr 7, 2025
Post comments count 0
Post likes count 3

Pure Virtual C++ 2025 Talks Announced

Sy Brand
Sy Brand

Pure Virtual C++ is our free, one-day, virtual conference for the whole C++ community. This year, it is running on the 30th April. We're pleased to announce four of our five live sessions for the day: You can find abstracts for all the talks and register for the conference with the button below.

Automatically generate any doc comment for C++ functions in Visual Studio
Apr 3, 2025
Post comments count 0
Post likes count 0

Automatically generate any doc comment for C++ functions in Visual Studio

Sinem Akinci
Sinem Akinci

Have a difficult time documenting your C++ code? Spending too much time thinking of what a function and its parameters accomplish when generating documentation? Copilot is now integrated into C++ doc comments to automatically provide documentation suggestions based on the function’s contents in Visual Studio 2022 17.14 Preview 2. To learn more about this feature, please check out the original announcement on the Visual Studio blog. What do you think? Try out the latest Copilot features for your C++ workflows today. To access these updates to Copilot, you’ll need an active GitHub Copilot subscription a...

VS Code C++ Extension Updates: 4x Faster Colorization & 3.5x Faster Project Startup
Mar 25, 2025
Post comments count 2
Post likes count 0

VS Code C++ Extension Updates: 4x Faster Colorization & 3.5x Faster Project Startup

Alexandra Kemper
Alexandra Kemper

In the latest releases of the C++ Extension in Visual Studio Code, we have focused on performance improvements and stability. A fast, responsive, and reliable development environment is essential for maintaining productivity, especially in large and complex C++ projects. These updates include many incremental optimizations that collectively speed up the time from opening a C++ project to writing code with the full suite of C++ features available at your fingertips. Experience these new features for yourself by updating to the newest version of the C++ Extension.  Faster Project Startup and Time to Colorization  ...

Boost Your CMake Development with Copilot Custom Instructions
Mar 25, 2025
Post comments count 0
Post likes count 3

Boost Your CMake Development with Copilot Custom Instructions

Garrett Campbell
Garrett Campbell

Introduction Creating a new CMake project that uses unfamiliar libraries can be daunting and time-consuming. This blog post takes you along on my journey using Copilot to make this easier, and leveraging Custom Instructions to tailor Copilot responses. For a sneak peek, see the outcome of this journey in this repository. Background As C++ developers who use Copilot every day, we’ve experienced how it can improve our day-to-day productivity. Copilot really shines in scenarios like new codebases or unfamiliar topics, significantly reducing ramp-up. There are multiple ways to engage with it in Visual Studio, incl...

Sign Up for the free Pure Virtual C++ 2025 Conference
Mar 21, 2025
Post comments count 0
Post likes count 1

Sign Up for the free Pure Virtual C++ 2025 Conference

Sy Brand
Sy Brand

Every year we run Pure Virtual C++: a free one-day virtual conference for the whole C++ community. Next month we’re doing it again! Sign-up for free to get access to our five live sessions and a host of pre-conference content. The live event will start at April 30th 14:00 UTC. Videos will be available to stream for free on YouTube after the conference. The speakers and topics will be announced soon. Hope to see you there!

C++ Dynamic Debugging: Full Debuggability for Optimized Builds
Mar 19, 2025
Post comments count 13
Post likes count 12

C++ Dynamic Debugging: Full Debuggability for Optimized Builds

David Li
David Li

Over the past 5 years, we’ve had many incredible opportunities to engage with game developers. From AAA studios to indie developers, the passion for slashing iteration times is significant. Amidst all the fantastic feedback we've received for Visual Studio, one sentiment has rung loud and clear: a desire to debug optimized C++ code without sacrificing performance. Although game developers have voiced this need the loudest, we know that solving this issue will benefit many other C++ workflows. While we've consistently rolled out many productivity and performance enhancements over the years, debugging optimized cod...

Optimizing Build Times with Build Insights: How Activision Cut Call of Duty’s Build Time by 50%
Mar 18, 2025
Post comments count 0
Post likes count 4

Optimizing Build Times with Build Insights: How Activision Cut Call of Duty’s Build Time by 50%

Moyo Okeremi
Moyo Okeremi

Slow build times are a major headache for developers, especially in large, complex C++ codebases like game engines. Every minute spent waiting on a build is time that could be used to refine features, resolve issues, or push development forward. Activision faced this challenge with Call of Duty: Modern Warfare II, where prolonged build times were slowing down iteration and impeding workflows. By leveraging Build Insights, they identified key inefficiencies, optimized bottlenecks, and successfully reduced build times from 27:49 minutes to just 14:25 minutes—cutting them in half. Read more about their journey in ou...

Visual Studio at GDC 2025
Mar 14, 2025
Post comments count 2
Post likes count 1

Visual Studio at GDC 2025

David Li
David Li

Join us in-person at Game Developers Conference 2025 with an in-depth look at how Visual Studio and GitHub Copilot can streamline your iteration workflow. Don’t miss the unveiling of our biggest C++ debugger update yet. Session Title: Accelerating Your Inner Loop with Visual Studio and GitHub Copilot Session Info: March 19th, 2025, 12:30 PM-1:30 PM Pacific Time | GDC Industry Stage, Expo Floor, South Hall Abstract: Get ready to supercharge your development process with the newest features in Visual Studio! This year, we're thrilled to unveil our most powerful C++ debugger upgrade yet, designed to sla...

Announcing Guidelines Support Library v4.2.0
Mar 6, 2025
Post comments count 0
Post likes count 3

Announcing Guidelines Support Library v4.2.0

Carson Radtke
Carson Radtke

Version 4.2.0 of Microsoft's Guidelines Support Library brings performance improvements, safety features, modern compiler support.

What’s New in vcpkg (February 2025): Package installation performance, new tested triplet, and more
Feb 27, 2025
Post comments count 0
Post likes count 1

What’s New in vcpkg (February 2025): Package installation performance, new tested triplet, and more

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.02.14 registry release, 2025-02-11, 2025-01-29, 2025-01-24, and 2025-01-20 tool releases, as well as changes to vcpkg documentation throughout February. This release includes significant performance improvements when installing packages, a new tested triplet (x64-windows-release), an overhaul of how vcpkg handles some downloads and console output, and bug fixes. In terms of documentation, there are improvements to our maintainer guide, registries articles, and versioning articles, among others. Some stats for this period: ...

std::generator: Standard Library Coroutine Support
Feb 24, 2025
Post comments count 0
Post likes count 6

std::generator: Standard Library Coroutine Support

Sy Brand
Sy Brand

is a C++23 feature that enables you to write concise, straightforward functions that generate sequences of values on-demand without manually managing state. It builds upon C++20’s coroutines, providing some standard library support for this powerful, but complex, language feature. As of Visual Studio 2022 version 17.13, we ship an implementation of in our standard library. This blog post will walk through an example of how to use the feature, compare it to implementing custom ranges, consider some of the design decisions made, and briefly look at the performance implications. Motivating Example Here’s a sh...

MSVC Address Sanitizer updates in Visual Studio 2022 version 17.13
Feb 21, 2025
Post comments count 0
Post likes count 4

MSVC Address Sanitizer updates in Visual Studio 2022 version 17.13

Zachary Johnson
Zachary Johnson

We have been investing in the quality of MSVC Address Sanitizer (ASan) in several key areas over the past year, including working with LLVM upstream to stay coordinated with their changes, adding coverage for internal tools and libraries, and hardening APIs and runtime modes.  Upstreaming to LLVM  MSVC ASan is derived from a fork of the LLVM repository. Prior to Visual Studio 2022 version 17.12, MSVC ASan was based on outdated versions of LLVM’s compiler-rt (where the ASan source code lives), and we could not incorporate changes from newer versions of LLVM without significant delay.   We have recently comple...

Visual Studio Code CMake Tools Extension 1.20 Release: Introducing Built-In CMake Language Services
Feb 20, 2025
Post comments count 2
Post likes count 2

Visual Studio Code CMake Tools Extension 1.20 Release: Introducing Built-In CMake Language Services

Sinem Akinci
Sinem Akinci

The February release of CMake Tools in VS Code is now available. With this release, we have some new updates to the extension to improve CMake integrations with the extension’s support. Some updates include the built-in support for CMake Language services, addressing our most highly-upvoted issues in the CMake Tools extension, and CMake presets v9 support. To view the full list of updates with this release, please look at our CHANGELOG. This release features the following nine contributions from our open-source community. Thank you for your continued support! Built-i...

MSVC C++ Code Analysis: Updates in Visual Studio 2022 version 17.13
Feb 19, 2025
Post comments count 0
Post likes count 3

MSVC C++ Code Analysis: Updates in Visual Studio 2022 version 17.13

Carson Radtke
Carson Radtke

This post details the latest updates in Visual Studio 2022 version 17.13 for MSVC C++ Code Analysis. Driven by internal team insights and developer community feedback, these improvements significantly reduce false positives and strengthen production code security.

C++ Language Updates in MSVC in Visual Studio 2022 17.13
Feb 11, 2025
Post comments count 0
Post likes count 3

C++ Language Updates in MSVC in Visual Studio 2022 17.13

Cameron DaCamara
Cameron DaCamara

Introduction For this update, we have changed things up a little bit. We now have more distinct buckets of fixes/implemented features. This is to help guide readers who care about specific features to more easily see how the compiler front-end team is making progress on the things you care about. 17.12 notes for reference. C++23 Features As part of our continuing ramp-up on C++23 conformance, the team has implemented the following features. In future releases customers can expect to see continued acceleration towards C++23 conformance. Note: C++23 features can be used by either adding or to the command...

What’s New for C++ Developers in Visual Studio 2022 17.13
Feb 11, 2025
Post comments count 4
Post likes count 3

What’s New for C++ Developers in Visual Studio 2022 17.13

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.13 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library and Compiler On the compiler side, we’ve implemented C++23’s literal suffix. The suffix or (or any permutation of these) will help you avoid sneaky truncations or signed comparison mismatches, especially when writing loops. For example: Note that, while this feature...

Document build instructions and more with enhanced C++ awareness from Copilot Chat in Visual Studio
Jan 30, 2025
Post comments count 1
Post likes count 2

Document build instructions and more with enhanced C++ awareness from Copilot Chat in Visual Studio

Sinem Akinci
Sinem Akinci

C++ development often involves nuances beyond the file you’re developing in. This can leave developers with many mental tabs open, balancing all the relevant context for their project to develop their C++ code properly. Copilot Chat in Visual Studio can already utilize context provided by specified files and invoked agents such as @workspace to generate suggestions. However, to improve the relevance of Copilot suggestions, we must provide tailored context to Copilot with considerations specific to the C++ language for developers to achieve better results. That way, developers can focus less on providing all th...

What’s New in vcpkg (January 2025)
Jan 23, 2025
Post comments count 0
Post likes count 0

What’s New in vcpkg (January 2025)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2025.01.13 registry release, 2025-01-11 tool release, as well as changes to vcpkg documentation throughout January. This release includes minor improvements and bug fixes. Some stats for this period: vcpkg changelog (2025.01.13 release) The following notable changes were made in January: Documentation changes There are no changes to vcpkg documentation this month. If you have any suggestions for our documentation, please submit an issue in our GitHub repo or see the box at the bottom of ...

What’s New in vcpkg (December 2024)
Jan 6, 2025
Post comments count 0
Post likes count 0

What’s New in vcpkg (December 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.12.16 registry release, 2024-12-09 tool release, as well as changes to vcpkg documentation throughout December. This release includes a command line option to force vcpkg to use classic mode even if a manifest file is found along with bug fixes. Some stats for this period: vcpkg changelog (2024.12.16 release) The following notable changes were made in December: Documentation changes If you have any suggestions for our documentation, please submit an issue in our GitHub repo or ...

MSVC Compiler Language Updates in Visual Studio 2022 version 17.12
Dec 6, 2024
Post comments count 0
Post likes count 6

MSVC Compiler Language Updates in Visual Studio 2022 version 17.12

Cameron DaCamara
Cameron DaCamara

Introduction In alignment with the Visual Studio 2022 version 17.12 release, and based upon feedback received from the community, the MSVC compiler team would like to provide greater visibility into the C++ language-level fixes for customer-reported issues that made it into the release. This is similar to how the standard library team publishes regular changelogs (see VS 2022 17.12 for reference). The focus for Visual Studio 2022 version 17.12 is primarily to address bugs reported through Developer Community. C++23 Features: While our overall focus has been on fixing bugs reported via Developer Community, we i...

What’s New in vcpkg (November 2024)
Nov 23, 2024
Post comments count 0
Post likes count 1

What’s New in vcpkg (November 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.11.16 registry release, 2024-11-12 tool release, as well as changes to vcpkg documentation throughout November. This release includes a command line option to force vcpkg to use classic mode even if a manifest file is found along with bug fixes. Some stats for this period: vcpkg changelog (2024.11.16 release) The following changes were made in November: Documentation changes If you have any suggestions for our documentation, please submit an issue in our GitHub repo or ...

Siemens Healthineers manages C++ libraries with vcpkg in an offline build environment
Nov 12, 2024
Post comments count 0
Post likes count 2

Siemens Healthineers manages C++ libraries with vcpkg in an offline build environment

Augustin Popa
Augustin Popa

vcpkg is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. For this blog post, I spoke to Shrey Chauhan, a Senior DevOps Engineer with Siemens Healthineers. Siemens Healthineers adopted vcpkg in late 2023 after a successful proof of concept. Their main motivation was to improve their versioning and overall dependency management for C++ libraries in their offline, air-gapped build environment. They also like vcpkg’s integration with ...

What’s New for C++ Developers in Visual Studio 2022 17.12
Nov 12, 2024
Post comments count 5
Post likes count 2

What’s New for C++ Developers in Visual Studio 2022 17.12

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.12 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library and MSVC Compiler As always, you can find all the details about our STL work in the changelog on GitHub. Thanks to everyone who contributed changes for this release! On the conformance side, we have finished the implementation of C++23’s P2286R8 Formatting Ranges by im...

What’s New in vcpkg (October 2024)
Nov 7, 2024
Post comments count 0
Post likes count 1

What’s New in vcpkg (October 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.10.21 registry release, 2024-10-18 tool release, as well as changes to vcpkg documentation throughout October. This release adds support for Azure universal packages as a binary caching provider and other minor improvements. CppCon Talk on Managing C++ Dependencies I also gave a talk at CppCon about 10 Problems Large Companies Have with Managing C++ Dependencies and How to Solve Them. Here is a video recording of the talk: In particular, I talked about several vcpkg features that can help: Some stats f...

Microsoft C++ Team at CppCon 2024: Trip Report
Nov 1, 2024
Post comments count 0
Post likes count 1

Microsoft C++ Team at CppCon 2024: Trip Report

Augustin Popa
Augustin Popa

The Microsoft C++ team attended CppCon, the largest C++ conference in the world. This year, the conference was held in Aurora, Colorado from September 16-20. Microsoft Booth Our team managed a booth from Monday to Thursday of the week. This gave us an amazing opportunity to interact with the C++ community and discuss many topics of interest as well as hear feedback from our customers. The following people worked at the booth (from left to right in the picture above): Microsoft works on several developer tools for C++, including the Visual Studio IDE, Visual Studio Code, the M...

Analyzing the Performance of the “Proxy” Library
Nov 1, 2024
Post comments count 3
Post likes count 4

Analyzing the Performance of the “Proxy” Library

Mingxin Wang
Mingxin Wang

This article analyzes the performance of the "Proxy" library in various scenarios, demonstrating its significant advantages in indirect invocations and lifetime management across different platforms.

Enhanced Breakpoint Expressions for C++ Debugging in Visual Studio
Oct 17, 2024
Post comments count 3
Post likes count 2

Enhanced Breakpoint Expressions for C++ Debugging in Visual Studio

Mryam Girmay
Mryam Girmay

Conditional Breakpoints Performance Improvement Debugging C++ code can be a time-consuming process, especially when dealing with complex scenarios. As a developer, it's frustrating to go through extensive setup and wait for a specific conditional breakpoint to trigger so you can analyze your application in a specific state. In Visual Studio 2022 version 17.10, we optimized the implementation of conditional breakpoints in C++ to enhance performance. We further improved this in version 17.11 to boost performance even more.  Key Improvements  Conditional breakpoints in Visual Studio for C++ pause code execution w...

New Contextual Tools for GitHub Copilot in Visual Studio
Oct 10, 2024
Post comments count 0
Post likes count 3

New Contextual Tools for GitHub Copilot in Visual Studio

Mryam Girmay
Mryam Girmay

Visual Studio 2022 17.11 now allows you to pass your entire workspace or specific classes and functions as context for GitHub Copilot Chat. By referencing your entire codebase, down to specific classes and functions, Copilot Chat can deliver refined and accurate results tailored to your code. @workspace for project references  You can now use GitHub Copilot Chat to refer to your entire C++ project using the @workspace command. This feature allows you to ask questions about your project, and GitHub Copilot will provide you with detailed responses. An example use case for the @workspace command in GitHub C...

What’s New in vcpkg (September 2024)
Oct 9, 2024
Post comments count 0
Post likes count 0

What’s New in vcpkg (September 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.09.23 and 2024.09.30 releases, 2024-09-18 and 2024-09-30 tool releases, as well as changes to vcpkg documentation throughout September. This month’s release includes some minor changes and bug fixes, 18 new ports, and 319 updates to existing ports. When updating vcpkg, we recommend moving to the 2024.09.30 release, which fixes some regressions in the 2024.09.23 release. Some stats for this period: vcpkg changelog (2024.09.23 & 2024.09.30 releases) The following notable changes were made in Septem...

Configure GitHub Copilot Access via Content Exclusion
Oct 7, 2024
Post comments count 0
Post likes count 0

Configure GitHub Copilot Access via Content Exclusion

Alexandra Kemper
Alexandra Kemper

Have you ever wanted greater control over the sensitive content AI-powered tools can access in your repositories? You can now customize Copilot’s access to your files with the newly announced GitHub Copilot Content Exclusion in both Visual Studio and Visual Studio Code. Through this new process you can configure Copilot to ignore certain files in your repository – such as sensitive files or information - when generating responses.   Once content has been excluded from Copilot:   GitHub Copilot’s granular control over content exclusion gives you the flexibility to enact company-wide security po...

Latest enhancements to Copilot workflows in Visual Studio: Move seamlessly from Copilot in Quick Info and more…
Oct 2, 2024
Post comments count 1
Post likes count 0

Latest enhancements to Copilot workflows in Visual Studio: Move seamlessly from Copilot in Quick Info and more…

Sinem Akinci
Sinem Akinci

There have been new integrations added to Copilot workflows in Visual Studio to make it even more seamless to navigate between in-editor activities and the Chat window that has context of global workspace, conversational history, and more to get the most out of Copilot, wherever you are. With the latest updates, you can streamline your workflow with slight tweaks and follow-up questions, allowing Copilot to provide the most relevant set of suggestions for your workflows. These include enhancements to inline chat and code completions in 17.11 and Copilot in quick info in 17.12 Preview 1. Refine Completions...

Visual Studio at Unreal Fest Seattle 2024
Sep 30, 2024
Post comments count 1
Post likes count 3

Visual Studio at Unreal Fest Seattle 2024

David Li
David Li

Join us in-person at Unreal Fest Seattle 2024 with an in-depth look at how Visual Studio and GitHub Copilot can help modernize your Unreal Engine game development. Session Title: Modernizing Game Development with Visual Studio and AI Session Info: October 3rd, 2024, 2:00 PM-3:00 PM Pacific Time | Room 445 Abstract: Join Microsoft to learn how Visual Studio can speed up your iteration cycle from start to finish. Discover productivity tools for optimizing class structure memory layout; identify and rectify build issues with Build Insights integration; and explore performance enhancements. We'll also cover ...

Tailored Code Completions for C++ Developers: Fine-tuned models are now in limited public beta for GitHub Copilot Enterprise
Sep 26, 2024
Post comments count 0
Post likes count 0

Tailored Code Completions for C++ Developers: Fine-tuned models are now in limited public beta for GitHub Copilot Enterprise

Erika Sweet
Erika Sweet

GitHub recently announced that custom models are available for GitHub Copilot Enterprise users in limited public beta. Custom models are fine-tuned on your organization’s proprietary codebases and coding practices to provide more contextually relevant and consistent inline suggestions. How It Works: Security and Privacy in Custom Models The data used to train your organization’s custom model is never used to train another customer’s model, and your custom model is never shared. You can learn more about the fine-tuning process in GitHub’s announcement post and documentation. C and C++ Case Study: Microsoft Offi...

What’s New in Visual Studio Build Insights 17.12
Sep 12, 2024
Post comments count 2
Post likes count 2

What’s New in Visual Studio Build Insights 17.12

Nelson Daniel Troncoso Eve Silfanus
Nelson,
Eve

We are excited to announce the latest Visual Studio 2022 17.12 Build Insights features. These updates provide developers with greater control and accuracy when diagnosing and optimizing C++ builds directly within Visual Studio. Download Visual Studio 2022 17.12 Preview We extend our thanks to the developer community, particularly our game studio partners, for providing invaluable feedback. Your input plays a vital role in shaping these new features. Learn more about Build Insights with our tutorials and documentation: Run Build Insights on Selected Files This feature is a game-c...

Microsoft C++ Team at CppCon 2024
Sep 12, 2024
Post comments count 0
Post likes count 3

Microsoft C++ Team at CppCon 2024

Sy Brand
Sy Brand

  As always our team will be at CppCon this year with a host of presentations. Many of us will also be present at our team’s booth in the main hall for the first four days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us (note: to join, head to #directory channel first, and check the checkbox next to "Visual Studio" box). We’re also running a survey for attendees. If you have a moment, please take our survey. It's quick and you could win a duffel bag ...

Fix C++ warnings and errors with Copilot: Introducing AI-Assisted Code Fixes in Visual Studio
Sep 11, 2024
Post comments count 2
Post likes count 2

Fix C++ warnings and errors with Copilot: Introducing AI-Assisted Code Fixes in Visual Studio

Sinem Akinci
Sinem Akinci

Stuck on an unfamiliar build error? Want to resolve your code errors quickly? Copilot is now integrated into Visual Studio error workflows to assist you with understanding and resolving C++ errors and warnings. To access this new feature, you will need an active Copilot subscription and the latest 17.11 GA version of Visual Studio. How does it work? There are two different entry points to accommodate where you are at in your error workflow: Semantically relevant code snippets from your active file and related files are automatically included as context to increase the relevant of the proposed fi...

Askia, an Ipsos company, achieved faster, reproducible builds with vcpkg
Sep 9, 2024
Post comments count 0
Post likes count 1

Askia, an Ipsos company, achieved faster, reproducible builds with vcpkg

Augustin Popa
Augustin Popa

vcpkg is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. In this interview, I spoke to Dimitri Rochette, a lead developer at Askia, an Ipsos company, about vcpkg’s impact on their team. After switching to vcpkg and CMake, Askia was able to reduce build times for their dependencies by using the vcpkg binary caching feature and reduce their code size by about 300,000 lines by eliminating project files, scripts, and copied depend...

What’s New in vcpkg (August 2024)
Sep 5, 2024
Post comments count 0
Post likes count 0

What’s New in vcpkg (August 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.08.23 release, 2024-08-01 tool release, as well as changes to vcpkg documentation throughout August. This month’s release includes several notable changes as well as bug fixes and documentation improvements. The most notable changes were: Some stats for this period: Lastly, it’s CppCon season, and I am giving a talk on 10 Problems Large Companies Have with Managing C++ Dependencies and How to Solve Them on Tuesday, September 17, 2024, from 16:45-17:45 MDT. If you are coming to the conferenc...

MSVC Backend Updates in Visual Studio 2022 version 17.11
Sep 4, 2024
Post comments count 1
Post likes count 4

MSVC Backend Updates in Visual Studio 2022 version 17.11

Sarthak Tamboli
Sarthak Tamboli

Visual Studio 2022 17.11 brings new optimizations, intrinsics, features, and improvements to the MSVC backend. Check out the highlights below:  ...

Announcing the Proxy 3 Library for Dynamic Polymorphism
Sep 2, 2024
Post comments count 5
Post likes count 9

Announcing the Proxy 3 Library for Dynamic Polymorphism

Mingxin Wang
Mingxin Wang

Next Generation Polymorphism in C++

Prevent Critical Bugs with MSVC Code Analysis
Aug 22, 2024
Post comments count 2
Post likes count 3

Prevent Critical Bugs with MSVC Code Analysis

Mryam Girmay
Mryam Girmay

Imagine this: You’re deep into a complex C++ project, and everything seems to be running smoothly. But then, out of nowhere, a critical bug surfaces— one that requires a bit more foresight. We’ve all been there, right? This is where code analysis steps in as your silent guardian.  Code analysis is a great tool for catching those elusive bugs and ensuring your code adheres to the best programming practices. It identifies defects that are difficult to discover through testing by searching for specific code patterns known to cause problems.   The analysis results are displayed in the Visual Studio Error List ...

What’s New for C++ Developers in Visual Studio 2022 17.11
Aug 13, 2024
Post comments count 1
Post likes count 7

What’s New for C++ Developers in Visual Studio 2022 17.11

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.11 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library We’re continuing to improve our open source standard library implementation. Thank you to everyone who has contributed features and fixes to this release! You can find the full set of changes at the STL changelog. Formatted Output We’ve made several advancements in our ...

GitHub Copilot Extensions for C++ developers and beyond now available in VS Code
Aug 7, 2024
Post comments count 0
Post likes count 4

GitHub Copilot Extensions for C++ developers and beyond now available in VS Code

Sinem Akinci
Sinem Akinci

GitHub Copilot is now more extensible than ever for extension authors in VS Code. At the Microsoft Build conference, we announced that VS Code extensions can now leverage APIs for Copilot to build custom chat participants that users can interact with in the GitHub Copilot Chat view in VS Code. To learn more, please watch the Build session on the new extensibility and read more on the VS Code blog.  Some notable extensions that have developed chat participants for public consumption include Microsoft Dev Box and Parallels. Another API that extensions can leverage LLMs with is the language model API. It enabl...

What’s New in vcpkg (July 2024)
Aug 1, 2024
Post comments count 0
Post likes count 0

What’s New in vcpkg (July 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.07.12 release, 2024-07-10 tool release, as well as changes to vcpkg documentation throughout July. This month’s release includes some minor changes to output, bug fixes, and documentation improvements. Some stats for this period:   vcpkg changelog (2024.07.12 release) The following notable changes were made in this release:   Documentation changes If you have any suggestions for our documentation, please submit an issue in...

MSVC Backend Updates in Visual Studio 2022 version 17.10
Jul 29, 2024
Post comments count 3
Post likes count 4

MSVC Backend Updates in Visual Studio 2022 version 17.10

Sarthak Tamboli
Sarthak Tamboli

Visual Studio 2022 17.10 brings new optimizations, intrinsics, features, and improvements to the MSVC backend. Check out the highlights below: Do you want to experience the new improvements in the C++ backend? Please download the latest Visual Studio 2022 and give it a try! Any feedback is welcome. We can be reached via the comments below, Developer Community, X (@VisualC), or email at [email protected]. Stay tuned for...

Genetec uses Visual Studio, CMake, vcpkg, and Docker for remote Linux C++ development
Jul 23, 2024
Post comments count 0
Post likes count 3

Genetec uses Visual Studio, CMake, vcpkg, and Docker for remote Linux C++ development

Sinem Akinci
Sinem Akinci

Over the past couple of months, the Microsoft C++ team reached out to a series of customers voting on a suggestion ticket asking for Remote Linux Unit Testing support to understand their full set of interactions and needs with CMake and remote Linux scenarios in Visual Studio. After these discussions, we built out a backlog of work items to deliver on any pain points in their experiences. One of the customers we interviewed and worked closely with during the process was Georg Zankl, a software developer for Genetec. Georg manages a project that uses dev containers and CMake. Our team helped Georg to bridge the...

Improving GitHub Copilot Completions in VS Code for C++ Developers
Jul 22, 2024
Post comments count 4
Post likes count 3

Improving GitHub Copilot Completions in VS Code for C++ Developers

Erika Sweet
Erika Sweet

GitHub Copilot code completions are autocomplete-stye suggestions that appear inline as you code. Until today, they have used context from your active file and other tabs open in the editor to inform the suggestion that is returned. However, we know that more contextually relevant input leads to better suggestions. Our team has made changes to the C/C++ extension and the GitHub Copilot extension in VS Code to ensure that other relevant C++ context — like available types and methods — are also provided to Copilot completions. When you use the latest version of the C/C++ extension and the GitHub Copilot extensio...

What’s New in vcpkg (June 2024)
Jun 27, 2024
Post comments count 0
Post likes count 1

What’s New in vcpkg (June 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.06.15 release, 2024-06-10 tool release, as well as changes to vcpkg documentation throughout June. This month’s release includes some error message improvements and bug fixes. Some stats for this period:   vcpkg changelog (2024.06.15 release) The following meaningful changes were made in this release:   Documentation changes If you have any suggestions for our documentation, please submit an issue in our GitHub repo or see the box at the ...

Understand your C++ symbols using Copilot in Visual Studio’s Quick Info
Jun 18, 2024
Post comments count 1
Post likes count 4

Understand your C++ symbols using Copilot in Visual Studio’s Quick Info

Sinem Akinci
Sinem Akinci

Navigating your codebase and forget what exactly that method does? Looking for quick, easy-to-digest information on your code at any point in your development journey? We are excited to announce that now when you hover over symbols in your codebase, you'll have the ability to invoke Copilot conveniently within the Quick Info dialog to learn more about a given symbol and enhance existing or lacking code documentation. How it works Normally, in the Quick info window, you would see comments or xml documentation if it was generated by your team in the code, which can sometimes be unrelated to what the given symb...

Bosch widely adopts Visual Studio 2022 after experiencing performance improvements for C++ Linux cross-compilation
Jun 10, 2024
Post comments count 0
Post likes count 1

Bosch widely adopts Visual Studio 2022 after experiencing performance improvements for C++ Linux cross-compilation

Sinem Akinci
Sinem Akinci

Introduction The Bosch security camera team had been evaluating Visual Studio as a unified development setup for their team’s C++ development, which includes remote Linux C++ development for cross-compiling.  While evaluating Visual Studio 2022, the team had a positive experience of using Visual Studio for their C++ development due to notable improvements over the years. Specifically, compared to their experience with Visual Studio 2019, they noticed improvements such as:  In Visual Studio 2022, they migrated their project from CMake settings to CMake presets to improve portability between Vi...

Integrating C++ header units into Office using MSVC (3/n)
Jun 5, 2024
Post comments count 4
Post likes count 0

Integrating C++ header units into Office using MSVC (3/n)

Cameron DaCamara Zachary Henkel
Cameron,
Zachary

Overview Introduction In our previous two (part 1, part 2) blog posts we discussed how Office was thinking holistically about header units. In this installment we’d like to share the concrete steps taken to integrate header units into the build of Microsoft Word, and their effect on build throughput. Throughout the post we'll use the term "build throughput" as opposed to "build performance" to avoid potential confusion with application runtime performance. This blog is primarily a recap of the presentation that Zachary gave at Pure Virtual C++ 2024. Remember that precompiled h...

What’s New in vcpkg (May 2024): Dedicated Pages for Each Package on vcpkg.io
May 31, 2024
Post comments count 1
Post likes count 4

What’s New in vcpkg (May 2024): Dedicated Pages for Each Package on vcpkg.io

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.05.24 release as well as changes to vcpkg documentation throughout May. This month’s update also includes individual pages for each package on the vcpkg website as well as several new documentation articles. Some stats for this period: There was no update this month to the vcpkg tool binary itself. However, we have made an important update to our website, vcpkg.io.   Individual pages for each port Each one of the 2,434 ports available in the vcpkg open-source registry now has a dedicated page o...

C++ Refactoring tools in Visual Studio
May 30, 2024
Post comments count 1
Post likes count 3

C++ Refactoring tools in Visual Studio

Mryam Girmay
Mryam Girmay

Code refactoring is the process of restructuring existing code, while its outward functionality remains unchanged. By refactoring, you can simplify complex code structures, reduce code redundancy, and enhance code reusability. Visual Studio offers many tools to help refactor your C++ code. This article will delve into these tools, using the bullet3 open-source code as an example.  Rename  The renaming tool is useful when changing a symbol name that appears in multiple locations within your code. Manual renaming can lead to errors if one or more instances of your function or variable are overlooked. However, the...

Visual Studio Code CMake Tools Extension 1.18 Update: Quick Start with CMake and more…
May 28, 2024
Post comments count 0
Post likes count 0

Visual Studio Code CMake Tools Extension 1.18 Update: Quick Start with CMake and more…

Sinem Akinci
Sinem Akinci

The May release of CMake Tools in VS Code is now available. With this release, we have some new updates to the extension to improve CMake integrations with the extension's support. Some major highlights include improvements to the CMake: Quick Start command and support for CMake presets v7 and v8. To view the full list of updates with this release, please look at our CHANGELOG. This release features 2 contributions from our open-source community (@OrkunTokdemir and @hippo91). We greatly appreciate your continued support! CMake: Quick Start Updates The CMake: Quick Start command is a command that assists u...

What’s New for C++ Developers in Visual Studio 2022 17.10
May 22, 2024
Post comments count 9
Post likes count 4

What’s New for C++ Developers in Visual Studio 2022 17.10

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.10 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library and Compiler We have incremented the minor version number of the MSVC toolset from 19.39 (VS 2022 v17.9) to 19.40 (VS 2022 v17.10). For more details, and some ways in which this will affect projects that assume that MSVC versions are all 19.3X for Visual Studio 2022 relea...

C++ at VS Code Day 2024
May 16, 2024
Post comments count 0
Post likes count 0

C++ at VS Code Day 2024

Alexandra Kemper
Alexandra Kemper

Looking to get caught up on new C++ features released in the last year? Check out the new YouTube video What’s New with C++ in VS Code posted for VS Code Day 2024. VS Code Day is an annual event hosted by the VS Code team which lets you elevate your development workflow with the latest and greatest features from Visual Studio Code. Sessions ranged from Generating Synthetic Datasets with GitHub Copilot to Real World Development with VS Code and C#.   The What’s New with C++ session covered updates to the C++ extension, CMake Tools extension, and tips on how you can leverage GitHub Copilot when developing a C++ pr...

Use AI-Powered Rename Suggestions to rename your C++ variables in Visual Studio
May 13, 2024
Post comments count 0
Post likes count 2

Use AI-Powered Rename Suggestions to rename your C++ variables in Visual Studio

Sinem Akinci
Sinem Akinci

We are very excited to announce C++ support for AI-Powered Rename Suggestions from GitHub Copilot in Visual Studio 2022. Seamlessly integrated into your familiar Rename workflow in the IDE, AI-powered rename suggestions dynamically generate name suggestions for any C++ identifier. It will generate proposed names based on its usage and your code's style to help you strike a balance between describing the variable with appropriate descriptive qualities while remaining concise. Instead of spending time brainstorming new names, you can focus on reviewing the variable names generated by Copilot to determine the approp...

Pure Virtual C++ 2024 Recordings Now Available
May 13, 2024
Post comments count 0
Post likes count 1

Pure Virtual C++ 2024 Recordings Now Available

Sy Brand
Sy Brand

All recordings for our Pure Virtual C++ 2024 conference are now available. Thanks to everyone who came along and hope to see you again next year! You can find the full playlist on YouTube. Main Sessions Automated Test of Shader Code - Keith Stockdale Message Handling with Boolean Implication - Ben Deane I Embedded a Programming Language in Debug Information - Sy Brand Enhancing C++ Development with Copilot Chat - Sinem Akinci Progress Report: Adopting Header Units in Microsoft Word - Zachary Henkel   Pre-conference Content ...

Building your C++ Code with CMake in VS Code
May 9, 2024
Post comments count 0
Post likes count 2

Building your C++ Code with CMake in VS Code

Alexandra Kemper
Alexandra Kemper

Build systems can help you manage your C++ project as it grows in scope and complexity, whether you are adding new features, dependencies, or cross-platform support. A popular choice in the C++ community is CMake which supports cross-platform development, streamlines build processes and configurations, and has many levels of customization. It also has first class support both in Visual Studio and in VS Code via the CMake Tools extension.   Check out our recent video on the steps you need to take to install and configure CMake in VS Code:     This video walks you through every step of the process:   ...

What’s New in vcpkg (April 2024)
May 8, 2024
Post comments count 0
Post likes count 3

What’s New in vcpkg (April 2024)

Augustin Popa
Augustin Popa

What’s New in vcpkg (April 2024) This blog post summarizes changes to the vcpkg package manager as part of the 2024.04.26 release as well as changes to vcpkg documentation throughout April. This month’s vcpkg release includes improvements for visually generated dependency graphs, a new triplet variable for tweaking what files are considered by the ABI hashing algorithm, several changes to our documentation, and some performance and bug fixes. Some stats for this period:   An overview of vcpkg in 10 minutes For the Pure Virtual C++ conference this year, I gave an overview of v...

New Checks Since Visual Studio 2022 17.8
May 3, 2024
Post comments count 2
Post likes count 2

New Checks Since Visual Studio 2022 17.8

Gabor Horvath
Gabor Horvath

The C++ team is committed to making your C++ coding experience as safe as possible. In the last couple of releases, we added new safety checks based on the requests of internal customers like the Windows group. Below is the overview of the new checks. For additional information for each of the checks, please refer to the linked help documents. C6395: Helping migration to C++17 and above Consider the following snippet: The meaning of the code depends on the order in which we evaluate the subexpressions. In case we evaluate the left-hand side of the assignment first, the code stores the incremented value of i ...

OpenMP improvements in Visual Studio C/C++ compiler: triangular loop collapse
Apr 30, 2024
Post comments count 0
Post likes count 0

OpenMP improvements in Visual Studio C/C++ compiler: triangular loop collapse

Vadim Paretsky
Vadim Paretsky

Our previous blog post about OpenMP support in Visual Studio announced support for the loop feature in version 17.8.  In the meantime, we have continued working on improving the feature and, in Visual Studio 2022 17.10, we have added a new, more efficient algorithm for partitioning work of certain types of collapsed triangular loops supported by the OpenMP Standard 5.2. All this work continues to be accessible if you are using the switch (see the Improved OpenMP Support for C++ in Visual Studio blogpost for details about this switch). In this blog we will describe this algorithm in some detail:  Triangular ...

Pure Virtual C++ 2024 is Now Live!
Apr 30, 2024
Post comments count 0
Post likes count 0

Pure Virtual C++ 2024 is Now Live!

Sy Brand
Sy Brand

Pure Virtual C++, our free one-day virtual conference for the whole C++ community, is now live! Check it out on YouTube: The sessions are:

Pure Virtual C++ 2024 is Tomorrow
Apr 29, 2024
Post comments count 0
Post likes count 0

Pure Virtual C++ 2024 is Tomorrow

Sy Brand
Sy Brand

Pure Virtual C++ is our free one-day virtual conference for the whole C++ community. This year it will run on April 30th 15:00 UTC. Sign-up for free to get access to our five sessions on the day. The sessions are: We've added a host of new pre-conference content which you can check out in the meantime. In the last week we've released:

Usability Improvements in the Visual Studio Connection Manager
Apr 26, 2024
Post comments count 2
Post likes count 2

Usability Improvements in the Visual Studio Connection Manager

Sneha Ramachandran
Sneha Ramachandran

In Visual Studio 2022 17.10 Preview 2, we’ve introduced some UX updates and usability improvements to the Connection Manager. With these updates we provide a more seamless experience when connecting to remote systems and/or debugging failed connections. Please install the latest Preview to try it out. Read on to learn what the Connection Manager does, and which issues that we resolved.  What is the Connection Manager?  The Connection Manager is a tool in Visual Studio that allows users to manage and store SSH connections to remote systems. You can add new connections, edit existing connections, and set the defa...

Visual Studio features for C++ Header Files and Modules
Apr 25, 2024
Post comments count 0
Post likes count 2

Visual Studio features for C++ Header Files and Modules

Mryam Girmay
Mryam Girmay

In the field of C++ programming, the management of header files and modules can often seem challenging. However, there are numerous tools and features available that can simplify this process, enhancing efficiency and reducing the likelihood of errors. Here’s a walkthrough for several tools that we provide for C++ headers and modules. Run Build Insights Start by running Build Insights, through navigating to Build > Run Build Insights. This tool provides insights into the Include File and Include Tree views to analyze and optimize your #include usage. For instance, in the bullet3 sample repository, run...

Pure Virtual C++ Pre-Conference Videos – Linux Development, Modules, Containers and more!
Apr 22, 2024
Post comments count 0
Post likes count 0

Pure Virtual C++ Pre-Conference Videos – Linux Development, Modules, Containers and more!

Sy Brand
Sy Brand

  Pure Virtual C++ is our free one-day virtual conference for the whole C++ community. This year it will run on April 30th 15:00 UTC. Sign-up for free to get access to our five sessions on the day. Half of the pre-conference content for the conference is now available. We have videos on a host of topics: Keep your eye out for more in the run up to the conference!

VS Code C++ Extension 1.19 Release: 3.6x faster Go To Symbol & 1.5x faster colorization
Apr 18, 2024
Post comments count 0
Post likes count 0

VS Code C++ Extension 1.19 Release: 3.6x faster Go To Symbol & 1.5x faster colorization

Alexandra Kemper
Alexandra Kemper

With our recent 1.19 release, performance was our biggest focus for the C++ Extension in Visual Studio Code. This included features like progressive population of IntelliSense results and faster symbol searching. With these enhancements, you can begin writing C++ code when opening a file quicker than ever before. Additionally, we also added support for fuzzy results when searching for symbols.  Faster Go To Symbol Search  Searching for symbols using the “Go to Symbol in Workspace” command now uses a new algorithm which returns relevant results in a fraction of the time it took previously.   This new algorith...

Templates View for Build Insights in Visual Studio 
Apr 15, 2024
Post comments count 3
Post likes count 5

Templates View for Build Insights in Visual Studio 

Lauren Prinn Hannah Chandley
Lauren,
Hannah

Introduction Introducing the new Templates View feature of Build Insights! Templates View now allows you to capture data about how templates in your codebase are contributing to your build time. This feature is available in Visual Studio 2022 17.10 and later.   Download Visual Studio 2022  Getting Started with Templates View  To use Build Insights in Visual Studio you will need to ensure you’ve installed the “C++ Build Insights” component. This is installed by default if you’ve installed either the “Desktop development with C++” or “Game development with C++” workloads.  By default, Templates View is tur...

MSVC Address Sanitizer adoption in .NET’s CoreCLR
Apr 12, 2024
Post comments count 2
Post likes count 4

MSVC Address Sanitizer adoption in .NET’s CoreCLR

Zachary Johnson
Zachary Johnson

Collaboration to improve the reliability and security of .NET, from the perspective of an MSVC Address Sanitizer Developer Introduction .NET (on GitHub) is a cross-platform, open-source, and general-purpose development platform with widespread adoption. A core component of .NET is the Core Common Language Runtime (CoreCLR), which provides services such as memory management, exception handling, threading, and interoperability with native code. It is used by millions of developers across multiple platforms, including Windows, Linux, and Mac OSx. The CoreCLR is implemented in native code, C and C++, and is a co...

Time Travel Debugging team uses Copilot Chat for C++
Apr 10, 2024
Post comments count 0
Post likes count 3

Time Travel Debugging team uses Copilot Chat for C++

Sinem Akinci
Sinem Akinci

Ken Sykes and Juan Carlos Arevalo Baeza (JCAB) are both Principal Software Engineers who work on the Time Travel Debugging team at Microsoft, which is the team that maintains and develops the Windows Debugger (WinDbg) and related technologies. Their codebase is developed with C++ and CMake, and they primarily use Visual Studio Code for developing their code. They have been integrating GitHub Copilot and GitHub Copilot Chat into their C++ development in VS Code and have found many useful workflows for the AI pair programmer. This blog post series has been written in partnership with Ken and JCAB to highlight...

How Copilot is being used by the Time Travel Debugging team for repetitive C++ coding
Apr 3, 2024
Post comments count 3
Post likes count 4

How Copilot is being used by the Time Travel Debugging team for repetitive C++ coding

Sinem Akinci
Sinem Akinci

Background  Ken Sykes and Juan Carlos Arevalo Baeza (JCAB) are both Principal Software Engineers who work on Time Travel Debugging at Microsoft. They are part of the team that maintains and develops the Windows Debugger (WinDbg) and related technologies. Their codebase is developed with C++ and CMake and they primarily use VS Code for day-to-day development of their code.  They have been integrating GitHub Copilot and GitHub Copilot Chat into their C++ development in VS Code and have found many useful workflows for the AI pair programming tool.   Download GitHub Copilot To access GitHub Copilot and Copi...

Pure Virtual C++ 2024 Sessions Announced
Apr 3, 2024
Post comments count 0
Post likes count 2

Pure Virtual C++ 2024 Sessions Announced

Sy Brand
Sy Brand

Pure Virtual C++ is our free one-day virtual conference for the whole C++ community. This year it will run on April 30th 15:00 UTC. Sign-up for free to get access to our five sessions on the day and a host of pre-conference content. Here is the list of sessions:

What’s New in vcpkg (March 2024)
Mar 29, 2024
Post comments count 0
Post likes count 0

What’s New in vcpkg (March 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.03.19 and 2024.03.25 releases as well as changes to vcpkg documentation throughout March. This month’s vcpkg release includes an arm64ec platform expression, more flexibility when mixing static and dynamic libraries, diagnostics improvements, a change in the binary caching ABI calculation, and bug fixes. Some stats for this period:   vcpkg changelog (2024.03.19 + 2024.03.25 releases) Several improvements to diagnostics output. For example: Bug fixes: ...

Improvements in Variable Visibility when Debugging
Mar 22, 2024
Post comments count 8
Post likes count 4

Improvements in Variable Visibility when Debugging

Terry Mahaffey
Terry Mahaffey

In Visual Studio 2022 17.10 Preview 2, we’re including a small quality-of-life improvement that results in the Watch/Locals window displaying local variables correctly for any arbitrary frames in the call stack in debug builds. To try it out, please install the recently released Preview. For more information, read on.  The problem: missing variables in Watch Window Have you ever been in this situation? We’re debugging some code, and have a breakpoint we hit in a function, foo. We need to inspect the values of some local variables a bit up the call stack, so we open up the call stack window and click to that f...

Sign Up for the free Pure Virtual C++ 2024 Conference
Mar 19, 2024
Post comments count 0
Post likes count 2

Sign Up for the free Pure Virtual C++ 2024 Conference

Sy Brand
Sy Brand

Every year we run Pure Virtual C++: a free one-day virtual conference for the whole C++ community. Next month we’re doing it again! Sign-up for free to get access to our five live sessions and a host of pre-conference content. The live event will start at April 30th 15:00 UTC. Videos will be available to stream for free on YouTube after the conference. The speakers and topics will be announced soon. Hope to see you there!

Using Copilot Chat with C++ in VS Code
Mar 13, 2024
Post comments count 0
Post likes count 3

Using Copilot Chat with C++ in VS Code

Sinem Akinci
Sinem Akinci

If you are a C++ developer who uses VS Code as your editor, Copilot Chat can help you with many of your everyday coding tasks by allowing you to iterate with your code in natural language. Download GitHub Copilot Chat To access GitHub Copilot and Copilot Chat, you will need an active subscription to GitHub Copilot. Chat features are available by installing the GitHub Copilot Chat extension for VS Code. If you’re just getting started, please check out the VS Code documentation. We have just released a new YouTube video demonstrating the power of Copilot Chat in C++ code: We cover how Copilot Chat c...

What’s New in vcpkg (February 2024)
Feb 29, 2024
Post comments count 1
Post likes count 0

What’s New in vcpkg (February 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.02.14 release and changes to vcpkg documentation throughout February. This month’s vcpkg release was mainly minor bug fixes, while several new documentation articles were added. Some stats for this period:   vcpkg changelog (2024.02.24 release)   Documentation changes If you have any suggestions for our documentation, please submit an issue in our GitHub repo or use the button “This page” at the bottom of a particular article. ...

MSVC Backend Updates since Visual Studio 2022 version 17.3
Feb 21, 2024
Post comments count 0
Post likes count 5

MSVC Backend Updates since Visual Studio 2022 version 17.3

Bran Hagger
Bran Hagger

Since Visual Studio 2022 version 17.3, we have continued to improve the C++ backend with new features, improved support for arm64 and OpenMP, and new and improved optimizations across all architectures.

What’s New for C++ Developers in Visual Studio 2022 17.9
Feb 13, 2024
Post comments count 4
Post likes count 5

What’s New for C++ Developers in Visual Studio 2022 17.9

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.9 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library We're continuing to improve our open source standard library implementation. Thank you to everyone who has contributed features and fixes to this release! You can find the full set of changes at the STL changelog. The main conformance highlight for this release is the i...

Visual Studio Code CMake Tools Extension 1.17 Update: CMake Presets v6, Overriding Cache Variables, and Side Bar Updates
Feb 13, 2024
Post comments count 0
Post likes count 0

Visual Studio Code CMake Tools Extension 1.17 Update: CMake Presets v6, Overriding Cache Variables, and Side Bar Updates

Sinem Akinci
Sinem Akinci

The February release of the CMake Tools extension in VS Code is now available. With this release, we have three major new updates to the extension, including some of our highly upvoted requests: To view the full list of updates with this release, please look at our CHANGELOG. This release features 2 contributions from our open-source community, and we greatly thank you for your support! CMake Presets v6 Support Kitware has added two new CMake Presets in version 6: workflow and package presets. Workflow presets allow you to define a string of CMake presets that you want to execute (e.g.  a confi...

A Year of C++ Improvements in Visual Studio, VS Code, and vcpkg
Feb 12, 2024
Post comments count 2
Post likes count 5

A Year of C++ Improvements in Visual Studio, VS Code, and vcpkg

Sy Brand
Sy Brand

As we enter the new year, it’s a good time to look back at all the features and improvements we made for C++ developers in our tools in 2023. We’ve made advancements across Visual Studio, Visual Studio Code, our toolchain, and the vcpkg package manager in both performance and functionality. Some particular areas of focus have been ARM64 support, Unreal Engine development, code safety, and cross-platform development. Contents Visual Studio Cross-Platform Cross-platform development is a first-class citizen in Visual Studio and has been for many years now. We’ve added many new features for those targeting Linu...

OpenMP improvements in Visual Studio C/C++ compiler: loop collapse
Feb 7, 2024
Post comments count 2
Post likes count 0

OpenMP improvements in Visual Studio C/C++ compiler: loop collapse

Natalia Glagoleva
Natalia Glagoleva

The MSVC compiler adds support for OpenMP "collapse" feature on for loops.

Quick Tips for using Copilot Chat with C++ in Visual Studio
Feb 6, 2024
Post comments count 5
Post likes count 7

Quick Tips for using Copilot Chat with C++ in Visual Studio

Sinem Akinci
Sinem Akinci

GitHub Copilot Chat is now available in both Visual Studio and Visual Studio Code when you have an active subscription to the service. Copilot Chat is your AI pair-programmer that allows you to speak in plain text through the chat interface to accomplish programming tasks such as understanding sections of code, generating test cases, and generating code. This blog post will focus on tips for using Copilot Chat functionality with C++ in Visual Studio, but the same functionality is available in Visual Studio Code and will be covered in future blog posts. Additionally, in future posts, we will dive into various C...

MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10
Feb 1, 2024
Post comments count 3
Post likes count 0

MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10

Daniel Griffing
Daniel Griffing

As we approach delivery of Visual Studio 2022 v17.9, the MSVC toolset version is 14.39. In Visual Studio 2022 version 17.10, the MSVC Toolset minor version will continue with 14.40 and continue incrementing in the ‘14.4x’ series. The file version and directories in Visual Studio v17.10 and subsequent installations will appear as follows: [VSInstallDir]\VC\Tools\MSVC\14.4x.BBBBB Where: We will make separate announcements about MSVC compiler toolset versions beyond 14.4x (i.e., versions >= 14.50) at an appropriate time in the future. Build System and Library Impact In Visual Studio 2022 ...

Testing the MSVC Compiler Backend
Jan 31, 2024
Post comments count 2
Post likes count 1

Testing the MSVC Compiler Backend

Troy Johnson
Troy Johnson

This post provides a behind-the-scenes look at how we test MSVC's backend, which is responsible for optimization and code generation. Many people worldwide use our compiler and expect it to provide a high-quality experience in terms of correctness (compiled code behaves as written), performance (speed of the compiled code), and throughput (speed of the compiler itself). By sharing with you how we test, you will better understand the level of quality control that goes into producing the compiler that you use. This topic may bring to mind a compiler bug that you have encountered in the past or are presently e...

What’s New in vcpkg (January 2024)
Jan 30, 2024
Post comments count 0
Post likes count 0

What’s New in vcpkg (January 2024)

Augustin Popa
Augustin Popa

This blog post summarizes changes to the vcpkg package manager as part of the 2024.01.12 release and changes to vcpkg documentation throughout January. This month’s vcpkg release was mainly minor bug fixes, while several new documentation articles were added. Some stats for this period:   vcpkg changelog (2024.01.12 release)   Documentation changes If you have any suggestions for our documentation, feel free to submit an issue in our GitHub repo. You can also leave feedback for existing articles by using the Feedback button ...

C++ in VS Code: Getting Started & Configuring IntelliSense
Jan 22, 2024
Post comments count 0
Post likes count 0

C++ in VS Code: Getting Started & Configuring IntelliSense

Alexandra Kemper
Alexandra Kemper

Ever wondered how you can configure IntelliSense in the C++ Extension  in Visual Studio Code? Or the easiest way to run your C++ code? With the new features added to the C++ extension, configuring IntelliSense and setting up a project is easier than ever. This includes a “Getting Started with C++” walkthrough, configure IntelliSense indicator, and the language status bar.   "Getting Started with C++" Walkthrough   With the C++ Extension for VS Code installed, the new Getting Started walkthrough helps you set up your environment and will have you running your C++ code in no time. Invoke it by running the...

MSVC ARM64 optimizations in Visual Studio 2022 17.8 
Jan 9, 2024
Post comments count 2
Post likes count 2

MSVC ARM64 optimizations in Visual Studio 2022 17.8 

Jiong Wang (ARM Ltd) Hongyon Suauthai (ARM)
Jiong,
Hongyon

Visual Studio 2022 17.8 has been released recently (download it here). While there is already a blog “Visual Studio 17.8 now available!” covering new features and improvements, we would like to share more information with you about what is new for the MSVC ARM64 backend in this blog. In the last couple of months, we have been improving code-generation for the auto-vectorizer so that it can generate Neon instructions for more cases. Also, we have optimized instruction selection for a few scalar code-generation scenarios, for example short circuit evaluation, comparison against immediate, and smarter immediate spli...

#include Diagnostics in Visual Studio
Jan 8, 2024
Post comments count 1
Post likes count 5

#include Diagnostics in Visual Studio

Mryam Girmay
Mryam Girmay

We’re excited to announce that the #include Diagnostics feature is now available in Visual Studio 2022 17.9 Preview 2. This new feature allows you to better understand the behavior of #include directives by providing detailed information on each directive’s references and build time.  To begin utilizing this feature, activate #include diagnostics by performing a right-click in your editor to display the context menu. Then, navigate to the ‘Include Directives’ option and choose ‘Enable #include Diagnostics’.  #include References  The feature in Visual Studio allows you to analyze the usage of #include...

What’s New in the vcpkg 2023.12.12 Release
Dec 16, 2023
Post comments count 0
Post likes count 1

What’s New in the vcpkg 2023.12.12 Release

Augustin Popa
Augustin Popa

The 2023.12.12 release of the vcpkg package manager is available. This blog post summarizes changes from November 21st, 2023 to December 12th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Feature changes   Bug fixes   Documentation changes   Total ports available for tested triplets While vcpkg supports a much larger variety of target platforms and architectures, the list above is validated exhaustively to ensure updated ports don’t break...

What’s New for Makefile Tools in Visual Studio Code Release 0.8: Post-Configure Scripts and more…
Dec 14, 2023
Post comments count 0
Post likes count 1

What’s New for Makefile Tools in Visual Studio Code Release 0.8: Post-Configure Scripts and more…

Sinem Akinci
Sinem Akinci

The latest version 0.8 of Makefile Tools in Visual Studio Code has shipped and is now available. This release includes two new features: a setting to support adding post-configure scripts and settings to add argument support to parse into your pre- and post-configure scripts. This release also features several bug fixes and improvements, including one from our open-source community. Thank you all for your contributions to this extension! Post-Configure Scripts In your Visual Studio Code settings, you can now specify a post-configure script to run after your Makefile configure step. Once a post config...

Azure Networking Team reaches peak productivity with Visual Studio’s new remote Linux capabilities and improvements
Dec 12, 2023
Post comments count 0
Post likes count 3

Azure Networking Team reaches peak productivity with Visual Studio’s new remote Linux capabilities and improvements

Sinem Akinci
Sinem Akinci

Over the past couple of months, the Microsoft C++ team reached out to a series of customers voting on a suggestion ticket asking for Remote Linux Unit Testing support to better understand their full set of interactions and needs with CMake and Remote Linux scenarios in Visual Studio. After these discussions, we built out a backlog of work items to deliver on any pain points in their experiences. One of the customers we interviewed and worked closely with during the process was John Schultz, an Azure Networking software engineer. Our team helped John not only to be able to F5 run his CTest unit tests for Linux,...

Directly Edit Unreal Engine Projects in Visual Studio 2022
Dec 12, 2023
Post comments count 0
Post likes count 7

Directly Edit Unreal Engine Projects in Visual Studio 2022

David Li
David Li

Introduction We are excited to announce that Visual Studio 2022 version 17.9 Preview 2 offers direct support for Unreal Engine projects. We would like to give a special thank you to the folks at Epic Games. Our on-going collaboration made this feature possible. In addition, this feature relies on the latest features of Unreal Engine 5.4. You will no longer need to generate a Visual Studio solution. Currently, whenever you are working with Unreal Engine projects in Visual Studio, you must generate a Visual Studio solution from within the Unreal Editor or using the Unreal Build Tool (UBT). However, this pro...

What’s New in the vcpkg 2023.11.20 Release
Nov 28, 2023
Post comments count 2
Post likes count 0

What’s New in the vcpkg 2023.11.20 Release

Augustin Popa
Augustin Popa

The 2023.11.20 release of the vcpkg package manager is available. This blog post summarizes changes from October 19th, 2023 to November 19th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Key changes This vcpkg update includes some bugfixes, documentation improvements, as well as a new community triplet. Notable changes for this release are summarized below.   Added mips64-linux community triplet A community contributor has added a mips64-linux community triplet. MIPS stands for Microprocessor w...

Functions View for Build Insights in Visual Studio 2022 17.8
Nov 17, 2023
Post comments count 0
Post likes count 2

Functions View for Build Insights in Visual Studio 2022 17.8

Eve Silfanus
Eve Silfanus

Introduction We are excited to unveil a new feature in Build Insights for Visual Studio: Functions View! This feature is available in Visual Studio 2022 version 17.8. Functions View offers essential insights into functions and forceinlines within your codebases. Download Visual Studio 2022 17.8 We extend our sincere thanks thanks to the developer community, especially our game studio partners, for actively providing feedback. Your contributions are invaluable in shaping this new feature. For more details about Build Insights and to explore other features like Included Files and Include Tree Views, pleas...

Debug vcpkg portfiles in CMake script mode with Visual Studio Code
Nov 16, 2023
Post comments count 0
Post likes count 0

Debug vcpkg portfiles in CMake script mode with Visual Studio Code

Ben McMorran
Ben McMorran

We recently announced support for debugging the CMake language using the VS Code CMake Tools extension. Now in version 1.16 of the extension, you can fine-tune the debugger configuration using a launch.json file. This enables debugging in CMake script mode in addition to the existing debugging of CMake project generation.  CMake script mode is an alternative way of running CMake that does not generate a build system, but instead uses the CMake language as a general-purpose scripting language. While script mode is not widely used (although there are fun esoteric examples), it is the mechanism that powers vcpkg ...

C++ Extension in VS Code 1.18 Release: Quick Fixes for missing header files, Extract to Function & More 
Nov 15, 2023
Post comments count 1
Post likes count 1

C++ Extension in VS Code 1.18 Release: Quick Fixes for missing header files, Extract to Function & More 

Alexandra Kemper
Alexandra Kemper

The 1.18 version of the C++ Extension in Visual Studio Code has been released. With this version of the extension, we have added several new features such as:    For the full list of changes, please reference the 1.18 release notes.   Quick Fixes for missing header files  Have you ever written C++ code and forgotten to add the right header? Gotten frustrated because of an IntelliSense error that turns out to just be a missing header file? We have now added a quick fix suggestion (lightbulb) to make the process of adding the correct header files to C++ files easier. If there is an unknown symb...

Visual Studio Code CMake Tools Extension 1.16 Update: New CMake Tools Sidebar and CMake Debugging options
Nov 15, 2023
Post comments count 0
Post likes count 1

Visual Studio Code CMake Tools Extension 1.16 Update: New CMake Tools Sidebar and CMake Debugging options

Sinem Akinci
Sinem Akinci

The November release of the CMake Tools extension in VS Code is now available. With this release, we have two major new updates to the extension:  The full list of updates can be seen in our change log. This release features 10 contributions from the open-source community. Thank you all for your continued support!  Release Schedule Updates Starting with this November release, CMake Tools will now release every 3 months. You can learn more about our release schedules on our release schedule wiki.  Updates to the default CMake Tools UI Starting in this 1.16 release, the default CMake Tools status b...

Unreal Engine and C++ Game Development Made Easy with Visual Studio 2022
Nov 14, 2023
Post comments count 2
Post likes count 3

Unreal Engine and C++ Game Development Made Easy with Visual Studio 2022

David Li
David Li

Introduction Creating amazing games just got easier. We are very happy to announce the latest Unreal Engine integrations and powerful C++ productivity features in Visual Studio 2022. Our team has been tirelessly working to incorporate your feedback and bring even more features that will enhance your game development experience whether you work on Unreal Engine or a proprietary engine. In this blog, we will explore how you can leverage the new Unreal Engine Test Adapter, which helps to streamline your testing process without leaving the IDE. Then, we will also show you how you can code faster with Unreal E...

What’s New for C++ Developers in Visual Studio 2022 17.8
Nov 14, 2023
Post comments count 15
Post likes count 3

What’s New for C++ Developers in Visual Studio 2022 17.8

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.8 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Standard Library The Standard Library Modules standardized in C++23 are now available in C++20 mode. This is a cross-vendor extension, planned or supported also by libstdc++ and libc++. We have also implemented several new C++23 and C++26 features, including augmented support for Freest...

vcpkg 2023.10.19 Release: Export for Manifests, Documentation Improvements, and More…
Nov 3, 2023
Post comments count 0
Post likes count 1

vcpkg 2023.10.19 Release: Export for Manifests, Documentation Improvements, and More…

Augustin Popa
Augustin Popa

The 2023.10.19 release of the vcpkg package manager is available. This blog post summarizes changes from August 10th, 2023 to October 19th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Key changes Notable changes for this release are summarized below. vcpkg export now supports manifest mode The vcpkg export command can be used to export built packages from the installed directory to a standalone SDK. A variety of formats are supported, including NuGet, a zip, or a raw directory. The SDK contains all pr...

Microsoft Visual C++ at CppCon 2023 Trip Report
Nov 2, 2023
Post comments count 0
Post likes count 0

Microsoft Visual C++ at CppCon 2023 Trip Report

Sinem Akinci
Sinem Akinci

The Visual C++ team attended CppCon 2023, the largest in-person C++ conference, in Aurora, Colorado from October 2-6th. There were over 700 attendees from the C++ community, and we really enjoyed getting a chance to meet all of you and talk about your unique backgrounds and C++ experiences. Some of our team member’s talks are now available to watch on YouTube so that you can watch them even if you missed CppCon to learn the latest for our tooling and more:  The venue was at the Gaylord Rockies this year. The Gaylord Rockies is a resort with a massive convention center and many restaurants ...

Structured Diagnostics in the New Problem Details Window
Oct 11, 2023
Post comments count 4
Post likes count 3

Structured Diagnostics in the New Problem Details Window

Sy Brand
Sy Brand

Massive compiler errors which seem impossible to navigate are the bane of many C++ developers’ lives. It’s up to tools to provide a better experience to help you comprehend diagnostics and understand how to fix the root issue. I wrote Concepts Error Messages for Humans to explore some of the design space and now, due to the hard work of many folks working on Visual Studio, we have a better experience to share with you all. You can read about some of the work which has led up to these changes in Xiang Fan’s blog post on the future of C++ diagnostics in MSVC and Visual Studio. In Visual Studio 2022 version 17.8 ...

Open Sourcing IFC SDK for C++ Modules
Oct 3, 2023
Post comments count 6
Post likes count 4

Open Sourcing IFC SDK for C++ Modules

GDR
GDR

Back with VS2019 version 16.10, we announced a complete implementation of C++ Modules (and, generally, of all C++20 features) across the MSVC compiler toolset, static analysis, IntelliSense, and debugger. Implementing Modules requires principled intermediate representation of C++ source programs. Today, we are thrilled to announce the availability of the IFC SDK, a Microsoft implementation of the IFC Specification. This is an open-source project under the Apache 2-with-LLVM-exception license. The IFC Specification formalizes C++ programs as data amenable to semantics-based manipulation. We are open sourcing the I...

Build Reliable and Secure C++ programs — Microsoft Learn
Oct 2, 2023
Post comments count 0
Post likes count 8

Build Reliable and Secure C++ programs — Microsoft Learn

Herb Sutter
Herb Sutter

“The world is built on C and C++” is no overstatement — C and C++ are foundational languages for our global society and are always in the world’s top 10 most heavily used languages now and for the foreseeable future. Visual Studio has always supported many programming languages and we encourage new languages and experiments; diversity and innovation are healthy and help progress the state of the art in software engineering. In Visual Studio we also remain heavily invested long-term in providing the best C and C++ tools and continuing to actively participate in ISO C++ standardization, because we know that our int...

Microsoft C++ Team at CppCon 2023
Sep 28, 2023
Post comments count 1
Post likes count 2

Microsoft C++ Team at CppCon 2023

Sy Brand
Sy Brand

As always our team will be at CppCon this year with a host of presentations. Many of us will also be present at our team’s booth in the main hall for the first two days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us (note: to join, head to #directory channel first, and check the checkbox next to "Visual Studio" box). We’re also running a survey on the C++ ecosystem. If you have a moment, please take our survey. It's quick and you could win a utility backpac...

MSVC ARM64 Optimizations in Visual Studio 2022 17.7
Sep 28, 2023
Post comments count 0
Post likes count 2

MSVC ARM64 Optimizations in Visual Studio 2022 17.7

Hongyon Suauthai (ARM)
Hongyon Suauthai (ARM)

In Visual Studio 2022 version 17.6 we added a host of new ARM64 optimizations. In this 2nd edition of our blog, we will highlight some of the performance improvements to MSVC ARM64 compiler backend, we will discuss key optimizations in the Visual Studio 2022 version 17.7 for both scalar ISA and SIMD ISA (NEON). We started introducing these performance optimizations in 17.6 release and we have landed them in 17.7 release. By element operation ARM64 supports by-element operation in several instructions such as , , , etc.  This feature allows a SIMD operand to be computed directly by a SIMD element using an index ...

C11 Threads in Visual Studio 2022 version 17.8 Preview 2
Sep 26, 2023
Post comments count 5
Post likes count 7

C11 Threads in Visual Studio 2022 version 17.8 Preview 2

Charlie Barto
Charlie Barto

Back in Visual Studio 2022 version 17.5 Microsoft Visual C gained preliminary support for C11 atomics. We are happy to announce that support for the other major concurrency feature of C11, threads, is available in Visual Studio version 17.8 Preview 2. This should make it easier to port cross-platform C applications to Windows, without having to drag along a threading compatibility layer. Unlike C11 atomics, C11 threads do not share an ABI with C++’s facilities, but C++ programs can include the C11 threads header and call the functions just like any C program. Both are implemented in terms of the primitives pr...

MSVC Machine-Independent Optimizations in Visual Studio 2022 17.7
Sep 25, 2023
Post comments count 10
Post likes count 5

MSVC Machine-Independent Optimizations in Visual Studio 2022 17.7

Troy Johnson
Troy Johnson

This blog post presents a selection of machine-independent optimizations that were added between Visual Studio versions 17.4 (released November 8, 2022) and 17.7 P3 (released July 11, 2023). Each optimization below shows assembly code for both X64 and ARM64 to show the machine-independent nature of the optimization. Optimizing Memory Across Block Boundaries When a small struct is loaded into a register, we can optimize field accesses to extract the correct bits from the register instead of accessing it through memory. Historically in MSVC, this optimization has been limited to memory accesses within the same ba...

Enhancing the CMake Targets View in Visual Studio
Sep 20, 2023
Post comments count 5
Post likes count 4

Enhancing the CMake Targets View in Visual Studio

Sinem Akinci
Sinem Akinci

The CMake Targets View in Visual Studio is a view that allows you to visualize your CMake project structure by the CMake targets and build specified target libraries and executables. To make this view more usable, we have implemented a few new improvements to make it easier than ever to navigate your CMake targets. This includes improved navigation to the CMake Targets View, a new, more simplified CMake Targets View, and the ability to exclude specified CMake items from the Targets View. Additionally, we have future planned work in the near-term to allow users to customize this view to their desired configuration...

What’s New for the Remote File Explorer in Visual Studio
Sep 18, 2023
Post comments count 3
Post likes count 2

What’s New for the Remote File Explorer in Visual Studio

Sinem Akinci
Sinem Akinci

The Remote File Explorer gives you the capability to access your files and folders on your remote machines that you are connected to through the Connection Manager in Visual Studio, without having to leave the IDE. Since we last spoke, the team has implemented new features to further enhance your remote file workflows by listening to your direct feedback.  Download the latest preview version of Visual Studio to access the new updates for the Remote File Explorer and give it a try. Background To access the Remote File Explorer, navigate to View > Remote File Explorer after downloading through the Linux and Em...

Make Member Function const and Global Function Static in Visual Studio
Sep 14, 2023
Post comments count 0
Post likes count 2

Make Member Function const and Global Function Static in Visual Studio

Mryam Girmay
Mryam Girmay

We are delighted to announce that Visual Studio Preview now includes the "Make Member Function Const" and "Make Global Function Static" features. To check out these features, make sure you update to the latest version of Visual Studio Preview.  Make Member Function Const Visual Studio now generates hints to mark member functions as when a member function doesn't modify the object's state. This feature identifies cases where a member function performs actions that could be accomplished through the object's public interface using a const pointer. We have made this process easier for you by adding a sugges...

Integrating C++ header units into Office using MSVC (2/n)
Sep 11, 2023
Post comments count 6
Post likes count 2

Integrating C++ header units into Office using MSVC (2/n)

Cameron DaCamara Zachary Henkel
Cameron,
Zachary

In this follow-up blog, we will explore progress made towards getting header units working in the Office codebase. Overview Overview Last time we talked about how and why header units can be integrated into a large cross-platform codebase like Office. We discussed how header units helped surface conformance issues (good) and expose and fix compiler bugs (good-ish). We talked about how we went about taking "baby steps" to integrate header units into smaller liblets—we're talking something on the order of 100s of header units. This blog entry is all about scale and how we mov...

MSVC Address Sanitizer – One DLL for all Runtime Configurations
Aug 10, 2023
Post comments count 5
Post likes count 3

MSVC Address Sanitizer – One DLL for all Runtime Configurations

Amy Wishnousky
Amy Wishnousky

With Visual Studio 2022 version 17.7 Preview 3, we have refactored the MSVC Address Sanitizer (ASan) to depend on one runtime DLL regardless of the runtime configuration. This simplifies project onboarding and supports more scenarios, particularly for projects statically linked (, ) to the C Runtimes. However, static configurations have a new dependency on the ASan runtime DLL. Summary of the changes: Motivation and Effects When building a project, you must specify how you want to link to the C and C++ Runtime Libraries. Using the option will link dynamically to the runtimes and have...

Introducing CMake Debugger in VS Code: Debug your CMake Scripts using Open-Source CMake Debugger
Aug 9, 2023
Post comments count 2
Post likes count 4

Introducing CMake Debugger in VS Code: Debug your CMake Scripts using Open-Source CMake Debugger

Sinem Akinci
Sinem Akinci

The new CMake Debugger that was introduced in Visual Studio is now available in VS Code. Now, you can debug your CMakeLists.txt scripts from VS Code using the CMake Tools Extension. To see the full release notes for this release and what else is included, including bug fixes, please see the release notes. Background The Visual C++ team collaborated closely with Kitware, the CMake maintainers, to merge our CMake debugger implementation upstream and make this widely available. This implementation is now available in CMake version 3.27. Please download the latest version for your OS via this link or update via you...

What’s New for C++ Developers in Visual Studio 2022 17.7
Aug 8, 2023
Post comments count 3
Post likes count 4

What’s New for C++ Developers in Visual Studio 2022 17.7

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.7 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Core Editor Comparing Files You no longer need to leave Visual Studio and rely on other tools to compare files. Now you can easily compare any file in Solution Explorer with other files by either: Please share your feedback here.  We’d love to hear your thoughts on this n...

vcpkg 2023.06.20 and 2023.07.21 Releases: GitHub Dependency Graph Support, Android Tested Triplets, Xbox Triplet Improvements, and More…
Jul 31, 2023
Post comments count 1
Post likes count 3

vcpkg 2023.06.20 and 2023.07.21 Releases: GitHub Dependency Graph Support, Android Tested Triplets, Xbox Triplet Improvements, and More…

Augustin Popa
Augustin Popa

The 2023.07.21 release of the vcpkg package manager is available. This blog post summarizes changes from April 16th, 2023 to July 21th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Notable Changes Notable changes for this release are summarized below:   GitHub Dependency Graph API In June, we announced vcpkg integration with the GitHub dependency graph. This is available for all vcpkg users on the 2023.07.21 release. If you are a GitHub user, we highly recommend checking it out to visualize you...

Partnering with The Coalition to Bring Unreal Engine Find All Blueprint References to Visual Studio 2022
Jul 20, 2023
Post comments count 0
Post likes count 1

Partnering with The Coalition to Bring Unreal Engine Find All Blueprint References to Visual Studio 2022

David Li
David Li

Introduction We are thrilled to bring you the 3rd batch of exciting Unreal Engine integrations in Visual Studio 2022! Since our initial announcements, our team has been hard at work building additional integrations based on your invaluable feedback. Recently, we have been working closely with our partners at The Coalition. Their work on the popular Gears of War franchise inspired us to ship a new feature that allows you to search for Blueprint UFUNCTION references. Today, we are excited to unveil additional performance improvements and a host of new features that will take your game development productivity ...

Visualize Macro Expansion for C++
Jul 13, 2023
Post comments count 8
Post likes count 10

Visualize Macro Expansion for C++

Mryam Girmay
Mryam Girmay

We are excited to announce the availability of Visualize Macro Expansion in Visual Studio 17.7 Preview. This feature lets you visualize the step-by-step expansion of macros. To begin utilizing this feature, ensure that you update to the latest version of Visual Studio Preview. Visualize Macro Expansion Visual Studio has introduced an enhanced Macro Expansion feature. This feature brings significant benefits, enabling you to comprehend and review complex multi-level macro expansions in a step-by-step manner. When you hover over a macro, you can access Quick Info, which now includes the Visualize Expansion li...

#include cleanup in Visual Studio
Jul 11, 2023
Post comments count 29
Post likes count 11

#include cleanup in Visual Studio

Mryam Girmay
Mryam Girmay

We are thrilled to announce the return of #include cleanup, a tool that helps you maintain clean code, now available in Visual Studio 17.8 Preview 1. To start using this feature, make sure to update to the latest version of Visual Studio Preview.  #include cleanup   Visual Studio now offers #include cleanup, a feature that improves the quality of your code by generating suggestions to remove unused headers and add direct headers. Our suggested workflow is to first go through the direct include suggestions to add direct headers where indirect headers are used, followed by removing the unused includes. R...

AddressSanitizer continue_on_error
Jun 29, 2023
Post comments count 3
Post likes count 5

AddressSanitizer continue_on_error

Jim Radigan
Jim Radigan

Visual Studio 17.6 comes with new functionality in the Address Sanitizer runtime which provides a new “checked build” for C and C++. This new runtime mode diagnoses and reports hidden memory safety errors, with zero false positives, as your app runs. Introduction C++ memory safety errors are a top concern for the industry. In Visual Studio 17.6, we deliver a new experimental Address Sanitizer feature: continue_on_error (COE). We’ll remove the experimental label in 17.8. You compile as before, by simply adding the compiler flag . With 17.6 you can enable the COE functionality by setting environment variables fro...

C++ Extension in VS Code 1.16 Release: Call Hierarchy & more
Jun 28, 2023
Post comments count 0
Post likes count 5

C++ Extension in VS Code 1.16 Release: Call Hierarchy & more

Alexandra Kemper
Alexandra Kemper

The 1.16 version of the C++ Extension in VS Code has now been shipped. With this version of the extension, we are releasing one of our most upvoted GitHub feature requests – Call Hierarchy. We also added new functionality when creating declarations and definitions that allows you to copy the declaration/definition and specify its placement in code, as well as adding other code enhancements. For the full list of changes, please reference the 1.16 release notes.   Call Hierarchy   With call hierarchy, you can now easily navigate your codebase, especially when trying to understand the complex calling relationships...

vcpkg integration with the GitHub dependency graph
Jun 27, 2023
Post comments count 2
Post likes count 3

vcpkg integration with the GitHub dependency graph

Michael Price
Michael Price

Introducing vcpkg's integration with the GitHub dependency graph

Using Key Events with warning C26800
Jun 26, 2023
Post comments count 0
Post likes count 0

Using Key Events with warning C26800

Dmitry Kobets
Dmitry Kobets

Here's how you can use Key Events to fix warning C26800

Build Insights Now Available in Visual Studio 2022
Jun 15, 2023
Post comments count 0
Post likes count 4

Build Insights Now Available in Visual Studio 2022

Nelson Daniel Troncoso
Nelson Daniel Troncoso

Introduction We're excited to announce that Build Insights is now integrated with Visual Studio 2022! Available in Visual Studio 2022 17.7 Preview 2, Build Insights provides critical information of your development environment. Using the analysis created by Build Insights, you will now have the power to effectively optimize your build times, especially large projects like AAA games. With Build Insights now integrated with Visual Studio, you will be able to capture your ETL trace and see your build analytics from within Visual Studio with only a few clicks. As a first step, you will be able to use the Include Fil...

Pure Virtual C++ Videos Available
Jun 14, 2023
Post comments count 0
Post likes count 3

Pure Virtual C++ Videos Available

Sy Brand
Sy Brand

All of the videos from our Pure Virtual C++ conference are now available! You can find them all on YouTube. Overall we had 18 videos on a wide variety of C++ topics, from Rust/C++ interoperability, to value semantics, to improving compiler errors. Here are the videos for our five live sessions which ran on the day of the conference:

Automatically Install Windows Subsystem for Linux from Visual Studio using New Seamless Integration
Jun 14, 2023
Post comments count 2
Post likes count 3

Automatically Install Windows Subsystem for Linux from Visual Studio using New Seamless Integration

Sinem Akinci
Sinem Akinci

Have you ever wanted to try using Windows Subsystem for Linux (WSL) to target Linux from your C++ project, but haven’t gone through the documentation or CLI installation process? Now, from Visual Studio with the Linux and Embedded Workload, Visual Studio makes it easier than ever to get to that one-click install of WSL. Download the latest preview version of Visual Studio and select the Linux and Embedded workload to give it a try! How do I start? When you open a CMake project that can target Linux, an info bar will open for users to click and open a WSL installation process. By default, it will install a WSL2 ...

Improved Doxygen Overload Resolution
Jun 13, 2023
Post comments count 2
Post likes count 3

Improved Doxygen Overload Resolution

Mryam Girmay
Mryam Girmay

We are excited to announce an enhanced Doxygen Comment Support for C++ in Visual Studio 17.7 Preview 2. To start using this feature, ensure to update to the latest version of Visual Studio Preview.   Improved Doxygen overload resolution  Doxygen comment support has been enhanced to improve the visibility and consistency of shared Doxygen comments across all overloads of a function. Previously, these comments were only displayed in Quick Info for the first overload, as shown below.  With this feature improvement, the shared Doxygen comment will now appear in Quick Info of all other overloads as well. This...

MSVC C++23 Update and Pure Virtual C++ Tomorrow!
Jun 5, 2023
Post comments count 0
Post likes count 1

MSVC C++23 Update and Pure Virtual C++ Tomorrow!

Sy Brand
Sy Brand

In preparation for Pure Virtual C++ tomorrow Stephan T. Lavavej has made a video update of all we've been working on for conformance in MSVC for C++20 and C++23. You can sign up for Pure Virtual C++ for free here. Stephan's video is here:

Pure Virtual C++: CMake Debugger, Build Insights in Visual Studio, and more
Jun 1, 2023
Post comments count 4
Post likes count 4

Pure Virtual C++: CMake Debugger, Build Insights in Visual Studio, and more

Sy Brand
Sy Brand

Pure Virtual C++ is our free, annual, one-day virtual conference for the whole C++ community. This year it is running June 6th and you can find the session list and sign-up for free on the event page. In the run up to the conference we will be publishing new C++ videos every day. You can find the playlist on YouTube. We've published a bunch of new videos the past week:

MSVC ARM64 optimizations in Visual Studio 2022 17.6 
May 29, 2023
Post comments count 7
Post likes count 3

MSVC ARM64 optimizations in Visual Studio 2022 17.6 

Jiong Wang (ARM Ltd)
Jiong Wang (ARM Ltd)

In the last couple of months, the Microsoft C++ team has been working on improving MSVC ARM64 backend performance and we are excited to have a couple of optimizations available in the Visual Studio 2022 version 17.6. These optimizations improved code-generation for both scalar ISA and SIMD ISA (NEON). Let’s review some interesting optimizations in this blog.  Before diving into technical details, we'd encourage you to create feedback here at Developer Community if you have found performance issues. The feedback helps us prioritize work items in our backlog. This, optimize neon right shift into cmp, is an examp...

Pure Virtual C++ 2023 Pre-Conference Videos
May 24, 2023
Post comments count 0
Post likes count 2

Pure Virtual C++ 2023 Pre-Conference Videos

Sy Brand
Sy Brand

Pure Virtual C++ is our free, annual, one-day virtual conference for the whole C++ community. This year it is running June 6th and you can find the session list and sign-up for free on the event page. In the run up to the conference we will be publishing new C++ videos every day. You can find the playlist on YouTube. The first two videos on Breakpoint Groups and Improved Step Filtering in the Visual Studio Debugger are live now!

vcpkg is Now Included with Visual Studio
May 18, 2023
Post comments count 7
Post likes count 4

vcpkg is Now Included with Visual Studio

Augustin Popa
Augustin Popa

As of Visual Studio 2022 version 17.6, the vcpkg C/C++ package manager is included as an installable component for the C++ Desktop and C++ Gaming workloads. You can also find it in the installer by searching for vcpkg package manager under the Individual components tab.   Using the Visual Studio Copy of vcpkg After you install or update Visual Studio with the vcpkg component checked, the package manager will be installed in your Visual Studio installation directory. You can run vcpkg commands directly from the Developer Command Prompt for Visual Studio or Developer PowerShell for Visual Studio. T...

Visual Studio 2022 version 17.6 for C++ Developers
May 16, 2023
Post comments count 8
Post likes count 2

Visual Studio 2022 version 17.6 for C++ Developers

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.6 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Cross-Platform You’re used to debugging your C++ code with a lot of help from the IDE, but what about your build system? You can use the new CMake Debugger to debug your CMake scripts at configure time. You can set breakpoints based on filenames, line numbers, and when CMake errors are ...

C++20 Support Comes To C++/CLI
May 16, 2023
Post comments count 4
Post likes count 8

C++20 Support Comes To C++/CLI

Tanveer Gani
Tanveer Gani

Details of C++20 support for C++/CLI introduced in VS 2022 17.6

What’s New for Makefile Tools in VS Code Version 0.7.0 – Variable Expansion and more…
May 15, 2023
Post comments count 0
Post likes count 1

What’s New for Makefile Tools in VS Code Version 0.7.0 – Variable Expansion and more…

Sinem Akinci
Sinem Akinci

The Makefile Tools team in VS Code has shipped the latest 0.7.0 version of the extension. In this version, we have enabled variable expansion for your Makefile projects in settings, so you no longer need to write plain paths for your Makefiles in the settings.json for the extension and can instead utilize variables that the Makefile extension can detect and replace values for. This allows for easier sharing of settings.json and improved consistency. Also, this allows for parameterization, so that you can define one setting and don’t need to constantly change its value if you toggle between different configuration...

Sign Up for the free Pure Virtual C++ 2023 Conference
May 10, 2023
Post comments count 0
Post likes count 0

Sign Up for the free Pure Virtual C++ 2023 Conference

Sy Brand
Sy Brand

Every year we run Pure Virtual C++: a free one-day virtual conference for the whole C++ community. Next month we’re doing it again! Sign-up for free to get access to our five live sessions and a host of pre-conference content. The live event will run June 6th 13:00-16:00 UTC. Videos will be available to stream for free on YouTube after the conference. The live sessions will be: Hope to see you there!

What’s New for CMake Tools 1.14 in VS Code  – Test Explorer
Apr 27, 2023
Post comments count 0
Post likes count 3

What’s New for CMake Tools 1.14 in VS Code – Test Explorer

Sinem Akinci
Sinem Akinci

The team has been working hard to provide new highly requested capabilities for CMake users. Now, in version 1.14, we have provided a new Test Explorer for using CTest with your CMake projects. This release also features open-source community contributions from users. Thanks for your contributions! Test Explorer One of our most highly-upvoted tickets in the CMake Tools Extension was the request for a Test Explorer for CTest. We are excited to announce that this is now available for users in the latest version of the CMake Tools extension in VS Code. Now, in your CMake projects, you can click the “Run CTest” ico...

Documentation for C++20 Ranges
Apr 26, 2023
Post comments count 2
Post likes count 2

Documentation for C++20 Ranges

Sy Brand Tyler Whitney
Sy,
Tyler

C++20 introduced Ranges to the standard library: a new way of expressing composable transformations on collections of data. This feature adds a huge amount of expressive power and flexibility to C++. As with many concepts in C++, that power comes with new concepts to learn, and some complexity which can be difficult to navigate. One way of taming that complexity is through complete, clear, comprehensive documentation. Christopher Di Bella and Sy Brand (one of the co-authors of this post) presented their ideas for C++ documentation in the era of concepts in their CppCon 2021 talk. Tyler Whitney (the other co...

Fill in the ISO C++ Developer Survey
Apr 24, 2023
Post comments count 0
Post likes count 0

Fill in the ISO C++ Developer Survey

Sy Brand
Sy Brand

The ISO C++ developer survey runs every year and is a great help to us in prioritizing work based on what the community cares about. It only takes about 10 minutes to complete and closes tomorrow, so please take the time to fill it out.  

vcpkg 2023.04.15 Release: vcpkg ships in Visual Studio, Xbox triplets, GitHub Actions Cache Support, and More…
Apr 22, 2023
Post comments count 2
Post likes count 4

vcpkg 2023.04.15 Release: vcpkg ships in Visual Studio, Xbox triplets, GitHub Actions Cache Support, and More…

Augustin Popa
Augustin Popa

The 2023.04.15 release of the vcpkg package manager is available. This blog post summarizes changes from February 25th, 2023 to April 15th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Notable Changes vcpkg now included with Visual Studio IDE As of Visual Studio 2022 (version 17.6), vcpkg is now added by default for IDE installations that include C++ workloads. Visual Studio users can run vcpkg commands from a Developer Command Prompt for Visual Studio targeting a new version of the IDE – both the ones ...

Functional exception-less error handling with C++23’s optional and expected
Apr 18, 2023
Post comments count 1
Post likes count 6

Functional exception-less error handling with C++23’s optional and expected

Sy Brand
Sy Brand

C++23's new facilities for handling disappointments without exceptions.

Even faster builds with Incredibuild 10 and Visual Studio 17.6 Preview 3
Apr 13, 2023
Post comments count 5
Post likes count 1

Even faster builds with Incredibuild 10 and Visual Studio 17.6 Preview 3

Michael Price
Michael Price

Note: This post was co-authored with Incredibuild's Director of Product Marketing, Yohai West. We are pleased to announce that Visual Studio version 17.6 Preview 3 includes Incredibuild's most advanced developer acceleration platform: Incredibuild 10. This release includes several notable, new features that empower teams to speed up the development process: In this post we'll detail how these features can improve your daily development. Build Cache - cache what you can; distribute the rest Incredibuild 10's most significant addition is its Build Cache technology. Incredibuild breaks down dev...

C++23’s New Fold Algorithms
Apr 13, 2023
Post comments count 6
Post likes count 11

C++23’s New Fold Algorithms

Sy Brand
Sy Brand

New fold algorithms in C++23, what they do, how to use them.

Maximize Unreal Engine Development with the Latest Integrations in Visual Studio 2022
Mar 29, 2023
Post comments count 3
Post likes count 3

Maximize Unreal Engine Development with the Latest Integrations in Visual Studio 2022

David Li
David Li

Introduction Since our announcement last month, the team has been working hard on building a new round of Unreal Engine integrations. Today, we are happy to show you the next set of features that can level up your game development productivity. In this article, you will learn about how to stream Unreal Logs, see Unreal Header Tool warnings in Visual Studio, and discover how you can be more productive working with HLSL files. All features mentioned below are available in the latest Visual Studio 2022 Preview. Visual Studio Toolbox – Game Dev Edition Curious to see these features in action? I chatted wit...

Create C++ Member Function in Visual Studio
Mar 28, 2023
Post comments count 3
Post likes count 2

Create C++ Member Function in Visual Studio

Mryam Girmay
Mryam Girmay

We are excited to announce that Create C++ Member Function can now be used to quickly add constructor and equality operator (operator ==) in Visual Studio 17.6 Preview 2. When you have a class with fields, you can add a default constructor, constructor with all fields, equality operator, and equality operator with all fields easily. Three dots will appear below a class name to indicate that you can add a member function, and you can hover over them to see the quick action (screwdriver icon). When the default constructor and equality operator are added respectively, the Go to Definition of the operator== is...

vcpkg 2023.02.24 Release: Default Triplet Changes, RISC-V support, Bug Fixes, and More…
Mar 6, 2023
Post comments count 1
Post likes count 0

vcpkg 2023.02.24 Release: Default Triplet Changes, RISC-V support, Bug Fixes, and More…

Augustin Popa
Augustin Popa

The 2023.02.24 release of the vcpkg package manager is available. This blog post summarizes changes from January 10th, 2023 to February 24th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos. Some stats for this period:   Notable Changes Notable changes for this release are summarized below:   Upcoming Default Triplet Changes Starting with the September 2023 vcpkg tool release, the default triplet for vcpkg libraries for Windows users will change from x86-windows to a detected host triplet. The detected host triplet will be infe...

std::string now supports Address Sanitizer
Mar 6, 2023
Post comments count 2
Post likes count 1

std::string now supports Address Sanitizer

Nicole Mazzuca
Nicole Mazzuca

The standard library now checks for more incorrect usage using the ASan "container overflow" feature in `std::string`.

Code Analysis Improvements in Visual Studio 17.6
Mar 3, 2023
Post comments count 1
Post likes count 3

Code Analysis Improvements in Visual Studio 17.6

Gabor Horvath
Gabor Horvath

Code Analysis Improvements in VS 17.6

Importing ST projects into Visual Studio
Feb 28, 2023
Post comments count 2
Post likes count 6

Importing ST projects into Visual Studio

Marc Goodner
Marc Goodner

Last year we introduced the ability to import ST projects in Visual Studio Code. We’re happy to announce the availability of this feature in Visual Studio 2022 17.6 as well. In the world of Arm microcontrollers there are many silicon vendors, one of the largest is STMicroelectronics. ST has a large catalog of available devices with many capabilities as well as supporting development boards for evaluating them. They also produce STM32CubeIDE, a custom IDE to use when targeting their devices, and STM32CubeMX, a configuration tool used in configuring properties of their devices and generating projects. If you ...

An alternative to __if_exists in ATL
Feb 28, 2023
Post comments count 0
Post likes count 0

An alternative to __if_exists in ATL

Anju Del Moral Gonzalez
Anju Del Moral Gonzalez

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
Feb 27, 2023
Post comments count 2
Post likes count 2

View files on your Remote Machines using the new Remote File Explorer in Visual Studio

Sinem Akinci
Sinem Akinci

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
Feb 22, 2023
Post comments count 5
Post likes count 12

CMake debugger allows you to debug your CMake scripts and more

Sinem Akinci
Sinem Akinci

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
Feb 21, 2023
Post comments count 14
Post likes count 2

Visual Studio 2022 version 17.5 for C++ Developers

Sy Brand
Sy Brand

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
Feb 16, 2023
Post comments count 14
Post likes count 7

Unreal Engine Integrations Now Available in Visual Studio 2022

David Li
David Li

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
Feb 15, 2023
Post comments count 1
Post likes count 4

Minecraft’s WSL build time cut in half after working with Visual Studio C++ team

Sinem Akinci
Sinem Akinci

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
Feb 1, 2023
Post comments count 2
Post likes count 3

Remote Native Unit Test Support in Visual Studio

Moyo Okeremi
Moyo Okeremi

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
Jan 31, 2023
Post comments count 0
Post likes count 1

VS Code C++ Extension January Update: Create Definitions and Declarations

Alexandra Kemper
Alexandra Kemper

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
Jan 25, 2023
Post comments count 0
Post likes count 3

Debug Linux Console apps in Visual Studio’s Integrated Terminal

Sinem Akinci
Sinem Akinci

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
Jan 24, 2023
Post comments count 4
Post likes count 1

C++ Brace Pair Colorization and More in Visual Studio

Mryam Girmay
Mryam Girmay

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
Jan 23, 2023
Post comments count 3
Post likes count 1

Deploy and debug apps on remote targets

Marc Goodner
Marc Goodner

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…
Jan 18, 2023
Post comments count 0
Post likes count 0

vcpkg 2023.01.09 Release: Registry Pattern Matching, Documentation Changes, and More…

Augustin Popa
Augustin Popa

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
Dec 14, 2022
Post comments count 2
Post likes count 0

vcpkg Documentation Moves to Microsoft Docs Platform

Augustin Popa
Augustin Popa

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
Dec 13, 2022
Post comments count 1
Post likes count 0

Standards conformance improvements to /Gw in Visual Studio version 17.5 Preview 2

Kyle Brady
Kyle Brady

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...

High-confidence Lifetime Checks in Visual Studio version 17.5 Preview 2
Dec 13, 2022
Post comments count 8
Post likes count 0

High-confidence Lifetime Checks in Visual Studio version 17.5 Preview 2

Gabor Horvath
Gabor Horvath

New High-confidence Lifetimes Checks in Visual Studio 2022

C11 Atomics in Visual Studio 2022 version 17.5 Preview 2
Dec 13, 2022
Post comments count 0
Post likes count 6

C11 Atomics in Visual Studio 2022 version 17.5 Preview 2

Charlie Barto
Charlie Barto

C11 Atomics in Visual Studio 2022 version 17.5 Preview 2

Improving the State of Debug Performance in C++
Dec 13, 2022
Post comments count 0
Post likes count 3

Improving the State of Debug Performance in C++

Cameron DaCamara
Cameron DaCamara

In this blog we will explore one change the MSVC compiler has implemented in an effort to improve the codegen quality of applications in debug mode. We will highlight what the change does, and how it could be extended for the future. If debug performance is something you care about for your C++ projects, then Visual Studio 2022 version 17.5 is making that experience even better! Please note that this blog will contain some assembly but being an expert in assembly is not required. Overview Motivation You might notice that the title of this blog is a play on words based on a recent popular...

MSVC OpenMP Update
Nov 29, 2022
Post comments count 2
Post likes count 1

MSVC OpenMP Update

Tanveer Gani
Tanveer Gani

Summary of your post, shown on the home page next to the featured image

A Tour of 4 MSVC Backend Improvements
Nov 28, 2022
Post comments count 4
Post likes count 4

A Tour of 4 MSVC Backend Improvements

Sy Brand Eric Brumer
Sy,
Eric

This blog post presents some of the optimizations the backend team has implemented for Visual Studio 2022.

vcpkg 2022.11.14 and 2022.10.19 Releases: Localization for 14 Languages, Overlay Ports/Triplets in Manifests, acquire-project Command, and More…
Nov 16, 2022
Post comments count 2
Post likes count 1

vcpkg 2022.11.14 and 2022.10.19 Releases: Localization for 14 Languages, Overlay Ports/Triplets in Manifests, acquire-project Command, and More…

Augustin Popa
Augustin Popa

The 2022.11.14 release of the vcpkg package manager is available. This blog post summarizes changes from September 27th, 2022 to November 13th, 2022 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:   Localized vcpkg output is now available One of the steps required for us to ship vcpkg in Visual Studio was to localize its output to a variety of languages. This experience is now enabled in the tool for 14 languages – the same languages available for Vis...

Visual Studio 2022 Performance: Faster C++ Source Code Indexing
Nov 15, 2022
Post comments count 0
Post likes count 3

Visual Studio 2022 Performance: Faster C++ Source Code Indexing

Victor Ciura
Victor Ciura

Building on top of performance wins in Visual Studio 2022 version 17.3, we are excited to announce additional improvements in version 17.4. Whether you are a game developer, work with large codebases, or have solutions with many C++ projects, your development experience in Visual Studio 2022 17.4 will feel even faster. In 17.4 we significantly reduced the time it takes to open a C++ project for the first time (cold load). While working on these improvements, we constantly check our performance against real-life large projects, including some of our own, as well as several C++ codebases for popular games ...

What’s New for C++ Developers in Visual Studio 2022 17.4
Nov 8, 2022
Post comments count 0
Post likes count 6

What’s New for C++ Developers in Visual Studio 2022 17.4

Sy Brand
Sy Brand

We are happy to announce that Visual Studio 2022 version 17.4 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. Arm64 In 17.3, Visual Studio became available as a native Arm64 application. We have continued work on supporting more development scenarios and are pleased to announce that the native Arm64 toolchain is now ready for production use! The “Desktop development with C++” and “Game developm...

Fix for High Risk OpenSSL Security Vulnerabilities Announced – Guidance for vcpkg Users
Nov 2, 2022
Post comments count 0
Post likes count 1

Fix for High Risk OpenSSL Security Vulnerabilities Announced – Guidance for vcpkg Users

Augustin Popa
Augustin Popa

OpenSSL.org announced the release of OpenSSL 3.0.7 to address two security vulnerabilities rated as high risk. This patch is now available, including via vcpkg. The vulnerabilities impact users of OpenSSL 3.0.0 - 3.0.6. If you are relying on a version of OpenSSL in this range, it is strongly recommended to upgrade to 3.0.7 as soon as possible. We also recommend reviewing Microsoft Security Response Center's central blog post on awareness and guidance related to these two CVEs: Awareness and guidance related to OpenSSL 3.0 – 3.0.6 risk (CVE-2022-3786 and CVE-2202-3602) – Microsoft Security Response Center. If y...

Microsoft Office team uses Remote MacOS Debugging Capability in Visual Studio
Nov 1, 2022
Post comments count 2
Post likes count 2

Microsoft Office team uses Remote MacOS Debugging Capability in Visual Studio

Sinem Akinci
Sinem Akinci

The Microsoft Office team approached the C++ team after seeing the Visual Studio announcement for support for debugging applications running on C++ from Windows through the Blizzard blog post. They had a need for a similar workflow, but for Macs instead of Linux. The C++ team worked closely with the Office engineers to adapt the same underlying technology for Mac.   The following blog post is written in conjunction with Anthony Penniston, an Office engineer we worked closely with to deliver this capability. Thank you, Anthony, for working with us! What does this team do? Anthony’s team in Office works on...

Improving Copy and Move Elision
Oct 24, 2022
Post comments count 6
Post likes count 4

Improving Copy and Move Elision

Bran Hagger
Bran Hagger

With Visual Studio 2022 version 17.4 Preview 3, we've significantly increased the number of situations where we do copy or move elision and given users more control over whether these transformations are enabled. What are copy and move elision? When a keyword in a C++ function is followed by an expression of non-primitive type, the execution of that return statement copies the result of the expression into the return slot of the calling function. To do this, the copy or move constructor of the non-primitive type is called. Then, as part of exiting the function, destructors for function-local variables are call...

vcpkg September 2022 Release is Now Available: Celebrating 6 Years with Over 2000 Libraries!
Oct 6, 2022
Post comments count 0
Post likes count 1

vcpkg September 2022 Release is Now Available: Celebrating 6 Years with Over 2000 Libraries!

Augustin Popa
Augustin Popa

The September 2022 release of the vcpkg package manager is available. This blog post summarizes changes from August 15th, 2022 to September 27th, 2022 for the Microsoft/vcpkg and Microsoft/vcpkg-tool GitHub repos.   vcpkg now has over 2,000 unique libraries in its open-source registry With this release, and the 6th anniversary of the launch of vcpkg, we are proud to hit a new milestone: over 2,000 unique open-source libraries are available in the vcpkg catalog! vcpkg continues to maintain the largest catalog of any C/C++ package manager with over 10,000 unique library versions with built-in support for ...

Announcing NuGet PackageReference support for C++/CLI MSBuild projects targeting .NET Core and .NET 5 or higher
Oct 3, 2022
Post comments count 4
Post likes count 1

Announcing NuGet PackageReference support for C++/CLI MSBuild projects targeting .NET Core and .NET 5 or higher

Augustin Popa
Augustin Popa

One of the new features for C++ developers in Visual Studio 2022 version 17.3 is NuGet PackageReference support for C++/CLI MSBuild projects that target .NET Core and .NET 5 or higher. More specifically, this impacts CLR Class Library (.NET) and CLR Empty Project (.NET) project templates. This functionality allows you to manage NuGet packages while bringing the benefits of PackageReference support to your dependencies. This feature is on by default for new projects. To enable this feature for your existing projects, add the following property to your project file: In most cases, you will want to enable...

Using system package manager dependencies with vcpkg
Sep 28, 2022
Post comments count 6
Post likes count 4

Using system package manager dependencies with vcpkg

Daniel Shaw
Daniel Shaw

According to the C++ 2022 developer survey, the top 3 ways to manage C++ libraries were having the library source code as part of the build, compiling the library separately from instructions, and acquiring the library from a system package manager. Language package managers, such as vcpkg, simplify library management by offering the ease of use of a system package manager with the power, flexibility, and portability of building from source. vcpkg brings several advantages to C++ library management. First, vcpkg supports a wide range of customizations for each library. vcpkg installs libraries with a specific ...

A Visual Studio Debugger Extension for the Raspberry Pi Camera
Sep 21, 2022
Post comments count 2
Post likes count 3

A Visual Studio Debugger Extension for the Raspberry Pi Camera

Paul Maybee
Paul Maybee

While developing a sample application for a Raspberry Pi with a camera using the RaspiCam library, it occurred to me that it would be convenient and fun to be able to see the current camera input while debugging the application.  The Visual Studio debugger supports type-specific custom visualizers and end-user extensions that implement UI for these visualizers. I decided to make one for the RaspiCam camera types that would display the current image from the camera. The image below is the end result, showing Visual Studio debugging a program running on the Raspberry Pi and displaying the content of a Raspberry Pi ...

Microsoft C++ Code Analysis Warnings with Key Events
Sep 20, 2022
Post comments count 3
Post likes count 1

Microsoft C++ Code Analysis Warnings with Key Events

Hwi-sung Im
Hwi-sung Im

Introduction  To make your C++ coding experience as safe as possible, the Microsoft C++ Code Analysis has added new checks and improved existing ones to help you prevent bugs before they find their way into your products. Some of the checks work harder than others, analyzing the code deeper by simulating runtime behavior. As such, they can find defects that are harder to find through syntactic checks alone or through data flow analysis.  It is natural that developers find it harder to find the root causes for some of these more complex warnings. Imagine a warning where the effect of the bug is detected tens o...

The Future of C++ Compiler Diagnostics in MSVC and Visual Studio
Sep 16, 2022
Post comments count 5
Post likes count 3

The Future of C++ Compiler Diagnostics in MSVC and Visual Studio

Xiang Fan
Xiang Fan

We are working hard on improving the diagnostics experience in MSVC and Visual Studio. We began this work in Visual Studio 2022 version 17.3 and while not everything is ready yet, we would like to share the early progress. Motivation & Principles New C++ features like concepts and ranges present the opportunity for more expressive code and better-defined APIs. However, to make the most of them, better diagnostics are required from tooling so that constraint failures can be pinpointed and resolved. We are aware that there is a lot of room for improvement, as noted by many of you on Developer Community...

Dev Containers for C++ in Visual Studio
Sep 14, 2022
Post comments count 2
Post likes count 7

Dev Containers for C++ in Visual Studio

Marc Goodner
Marc Goodner

We are happy to share with you that we have added Dev Container support In Visual Studio 2022 17.4 for C++ projects using CMake Presets. Containers are a great way to package up everything for running an application. Through a Dockerfile all prerequisites are captured so that there is a consistent runtime environment anywhere the container is deployed and run Dev Containers expand this concept to capture everything necessary for developing and building an application in the container. We have been observing for some time that containers are becoming more popular in the C++ community for providing reproducible ...

vcpkg Environment Activation in Visual Studio
Sep 14, 2022
Post comments count 0
Post likes count 4

vcpkg Environment Activation in Visual Studio

Marc Goodner
Marc Goodner

In Visual Studio 2022 17.4 vcpkg environments will now automatically activate. A vcpkg environment is described by a manifest that captures the artifacts necessary for building your application (learn more about vcpkg artifacts). Today the vcpkg artifact experience is focused on embedded developers, but we will be expanding this in time to all C++ development scenarios. Try vcpkg environment activation This is part of the Linux and embedded development with C++ workload., so make sure that is selected in your installation. Today you need to install vcpkg directly, it is not installed with Visual Studio y...

Integrating C++ header units into Office using MSVC (1/n)
Sep 12, 2022
Post comments count 5
Post likes count 9

Integrating C++ header units into Office using MSVC (1/n)

Cameron DaCamara Zachary Henkel
Cameron,
Zachary

.cameron { color: #4472c4; } C++20 has had a lot to offer and one feature in particular requires the most thought of all when integrating into our projects: C++ modules (or C++ header units in this particular case). In this blog we will show a real world case of integrating a new C++20 feature into a large codebase that we might all be familiar with. Just a few notes: Without further delay, let us jump right in! Overview How MSVC enables header units in a multi-platform codebase C++20 header units are a way to receive m...

Microsoft C++ Team at CppCon 2022
Sep 12, 2022
Post comments count 1
Post likes count 2

Microsoft C++ Team at CppCon 2022

Sy Brand
Sy Brand

The Microsoft C++ team has an exciting lineup of sessions at CppCon 2022. Many of us will also be present at our team’s booth in the main hall for the first two days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us (note: to join, head to #directory channel first, and check the checkbox next to "Visual Studio" box). We’re also running a survey on the C++ ecosystem. If you have a moment, please take our survey, it's quick. Here’s the lineup: Monday, Septem...

Importing ST projects into Visual Studio Code
Sep 1, 2022
Post comments count 9
Post likes count 7

Importing ST projects into Visual Studio Code

Marc Goodner
Marc Goodner

In the world of Arm microcontrollers there are many silicon vendors, one of the largest is STMicroelectronics. ST has a large catalog of available devices with many capabilities as well as supporting development boards for evaluating them. They also produce STM32CubeIDE, a custom IDE to use when targeting their devices, and STM32CubeMX, a configuration tool used in configuring properties of their devices and generating projects. If you are a developer already using ST’s products I’m not telling you anything new. You may not be aware though of the work we have been doing to enable embedded developers in Visual ...

vcpkg August 2022 Release is Now Available: CMake Version Update, Updated FAQ, Cross-compilation Fix for Apple Silicon
Aug 23, 2022
Post comments count 0
Post likes count 2

vcpkg August 2022 Release is Now Available: CMake Version Update, Updated FAQ, Cross-compilation Fix for Apple Silicon

Augustin Popa
Augustin Popa

The August 2022 release of the vcpkg package manager is available. This blog post summarizes changes from July 25th, 2022 to August 14th, 2022 for the Microsoft/vcpkg and Microsoft/vcpkg-tool GitHub repos. Some stats for this period:   Notable Changes This is a minor update and there was no tool update this month, so most of the changes are to the open-source ports registry or minor changes. See the full commit changelog for details. We call out several of the more interesting changes below.   vcpkg now uses CMake v3.24 Updated the version of CMake used by vcpkg to...

Updates to Visual Studio Build Tools license for C and C++ Open-Source projects
Aug 18, 2022
Post comments count 4
Post likes count 2

Updates to Visual Studio Build Tools license for C and C++ Open-Source projects

Marian Luparu
Marian Luparu

Visual Studio Build Tools (VSBT) can now be used for compiling open-source C++ dependencies from source without requiring a Visual Studio license, even when you are working for an enterprise on a commercial or closed-source project. This change expands user rights to the Build Tools and does not limit the existing Visual Studio Community license provisions around Open-Source development. If you already are a developer contributing to OSS projects, you can continue to use Visual Studio and Visual Studio Build Tools together for free, just like before. New License Benefits If you are an enterprise developer or...

proxy: Runtime Polymorphism Made Easier Than Ever
Aug 15, 2022
Post comments count 1
Post likes count 12

proxy: Runtime Polymorphism Made Easier Than Ever

Mingxin Wang
Mingxin Wang

proxy is a single-header cross-platform library that facilitates runtime polymorphism.

Official Support for Arm64EC is Here 
Aug 9, 2022
Post comments count 0
Post likes count 1

Official Support for Arm64EC is Here 

Pranav Srinivasan
Pranav Srinivasan

Last year, Microsoft announced x64 compatibility for Windows 11 on Arm, along with the new Arm64EC ABI, a new way to bring apps to Windows on Arm. With Arm64EC you can mix Arm and x64 code in the same process, allowing you to port existing x64 apps to Arm in an incremental way. We also announced experimental support for Arm64EC development in Visual Studio.  Now, after a year of bug fixes and product stabilization, we are here to announce that this toolset is leaving experimental mode in the 17.3 release, making it possible to build fully-supported Arm64EC applications for Windows 11 on Arm. We hope that using...

MSVC Backend Updates in Visual Studio 2022 version 17.3
Aug 9, 2022
Post comments count 0
Post likes count 1

MSVC Backend Updates in Visual Studio 2022 version 17.3

Chris Pulido
Chris Pulido

In Visual Studio 2022 version 17.3 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a list of improvements for you to review. Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2022 and give it a try! Any feedback is welcome. We can be reached via the comments below, Developer Community, and Twitter (@VisualC)  

MSBuild Low Priority Builds in Visual Studio
Jul 27, 2022
Post comments count 0
Post likes count 2

MSBuild Low Priority Builds in Visual Studio

Felix Huang
Felix Huang

The C++ team is happy to announce the completion of a highly upvoted C++ feedback ticket from Developer Community – Low Priority Builds. With your feedback and collaboration from our partner teams, you can now start Low Priority Builds within Visual Studio. This will ensure the MSBuild node spawns with a lower priority, affecting all compile and link processes. If the build is affecting you from having a responsive work environment, then this is the feature for you! Internally, VS interfaces with MSBuild like a service. The MSBuild team has added new API functionality to switch the priority of the MSBuild nodes...

vcpkg July 2022 Release is Now Available: Shared Libraries on Linux, Improved vcpkg new, Optional name and version Fields, and More…
Jul 25, 2022
Post comments count 4
Post likes count 1

vcpkg July 2022 Release is Now Available: Shared Libraries on Linux, Improved vcpkg new, Optional name and version Fields, and More…

Augustin Popa
Augustin Popa

The July 2022 release of the vcpkg package manager is available. This blog post summarizes changes from June 16th, 2022 to July 24th, 2022 for the microsoft/vcpkg and microsoft/vcpkg-tool GitHub repos. Some stats for this period:   Notable Changes Better support for shared libraries on Linux This update includes a community triplet for installing shared libraries on Linux: x64-linux-dynamic. This was made possible by adding rpath support to make ports relocatable. After building a port, the binaries are patched to have correct rpath values relative to lib/ (or debug/lib/). ...

New std::optional Checks in Visual Studio 2022 version 17.3 Preview 3
Jul 14, 2022
Post comments count 3
Post likes count 0

New std::optional Checks in Visual Studio 2022 version 17.3 Preview 3

Gabor Horvath
Gabor Horvath

New std::optional Checks in Visual Studio 2022

Integrated Terminal in Visual Studio: New SSH integration for Linux targeting
Jul 12, 2022
Post comments count 10
Post likes count 0

Integrated Terminal in Visual Studio: New SSH integration for Linux targeting

Sinem Akinci
Sinem Akinci

In the latest version of Visual Studio, users are now able to leverage the integrated terminal to access their remote targets when developing for remote machines from Windows. This updated terminal includes an interactive SSH shell. It can be accessed by going to View->Terminal in Visual Studio.  Now, instead of starting an SSH session inside of PowerShell or WSL and having to re-authenticate, you can select one of your existing connections with one click. The integrated terminal pulls from the stored connections established in your Connection Manager. You only have to authenticate once when you add a s...

VS2022 Performance Enhancements: Faster C++ Development
Jul 11, 2022
Post comments count 2
Post likes count 0

VS2022 Performance Enhancements: Faster C++ Development

David Li
David Li

Introduction Building on top of our performance wins in earlier releases of VS2022, we are excited to announce additional improvements in Visual Studio 2022 17.3! Whether you are a game developer, work with large codebases, or have a small C++ project, your C++ development experience in Visual Studio 17.3 will feel even faster! In this blog, I will share the incredible speed improvements you will experience when VS indexes your codebase and colorizes your C++ code for the first time. In addition, learn about the new Go to All experience that will show results as you type. Testing Methodology Measuring index...

C++23’s Deducing this: what it is, why it is, how to use it
Jun 27, 2022
Post comments count 5
Post likes count 13

C++23’s Deducing this: what it is, why it is, how to use it

Sy Brand
Sy Brand

Find out how C++23's Deducing this feature can help make your code better.

vcpkg June 2022 Release is Now Available: Force Download vcpkg Dependencies, Documentation Changes, and More
Jun 22, 2022
Post comments count 0
Post likes count 1

vcpkg June 2022 Release is Now Available: Force Download vcpkg Dependencies, Documentation Changes, and More

Augustin Popa
Augustin Popa

The June 2022 release of the vcpkg package manager is available. This includes a hotfix that fixed a regression in the binary caching experience. This blog post summarizes changes from May 11th, 2022 to June 15th, 2022 for the microsoft/vcpkg and microsoft/vcpkg-tool GitHub repos. In the past month, the ISO C++ 2022 Annual Developer Survey results were released. We want to thank the C++ community for taking the time to provide feedback on vcpkg in the survey. This year, 19% (+4% year over year) of respondents indicated they were using vcpkg. We hope to see more and more of the community adopting package manage...

What’s New in CMake for VS Code
Jun 15, 2022
Post comments count 0
Post likes count 0

What’s New in CMake for VS Code

Sinem Akinci
Sinem Akinci

The latest version of CMake tools is now available for download in the VS Code Marketplace or using the .vsix file. We have been working hard on improving the CMake experience and are excited to share some new features and improvements for users starting in version 1.11.  ‘CMake’ task provider updates  We have added more options to the build task and more commands for the “cmake” task type so you don’t have to manually type up shell tasks. Tasks make it easier to automate your workflows. With our new task provider commands, you can easily create workflows that include configuration, build, install, test, clean,...

Serial and Zephyr support for Visual Studio and VS Code
Jun 7, 2022
Post comments count 0
Post likes count 3

Serial and Zephyr support for Visual Studio and VS Code

Marc Goodner
Marc Goodner

We are continuing to improve our embedded development support in Visual Studio and VS Code. We have recently introduced a serial monitor and RTOS support for Zephyr. These capabilities are present in Visual Studio 17.3 Preview 1 as part of the Linux and embedded development workload. The Embedded Tools extension for VS Code also includes these capabilities, though the serial monitor is available as a stand-alone extension as well. This post illustrates these new capabilities in Visual Studio and VS Code. Serial monitor To start the serial monitor in Visual Studio in the Debug > Windows > Serial Monitor. ...

MSVC Backend Updates in Visual Studio 2022 version 17.2
Jun 7, 2022
Post comments count 1
Post likes count 1

MSVC Backend Updates in Visual Studio 2022 version 17.2

Chris Pulido
Chris Pulido

In Visual Studio 2022 version 17.2 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a list of improvements for you to review. Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2022 and give it a try! Any feedback is welcome. We can be reached via the comments below, Developer Community, and Twitter (@VisualC)

vcpkg May 2022 Release: artifacts using JSON, COS and SPDX support, and more
May 17, 2022
Post comments count 2
Post likes count 0

vcpkg May 2022 Release: artifacts using JSON, COS and SPDX support, and more

Augustin Popa
Augustin Popa

The May 2022 release of the vcpkg package manager is available. This blog post summarizes changes from March 31st, 2022 to May 10th, 2022 for the Microsoft/vcpkg and Microsoft/vcpkg-tool GitHub repos. Some stats for this period:   Notable Changes vcpkg Artifacts update This is our first significant update to vcpkg artifacts since we introduced them in December. The changes and additions are all on the artifact metadata used in populating catalogs of available artifacts. As such this section is mainly of interest to people working on preparing their own catalogs of artifacts. ...

Pure Virtual C++ 2022 Recordings Available
May 13, 2022
Post comments count 0
Post likes count 0

Pure Virtual C++ 2022 Recordings Available

Sy Brand
Sy Brand

Pure Virtual C++, a free one-day virtual conference for the whole C++ community, ran on 26th April 2022. All sessions are now available to watch online. Live sessions: Pre-conference sessions:  

MSVC’s STL Completes /std:c++20
May 10, 2022
Post comments count 5
Post likes count 0

MSVC’s STL Completes /std:c++20

Casey Carter
Casey Carter

We are happy to announce that the final C++20 Standard Library features are now stabilized and available in mode in both Visual Studio 2022 version 17.2 and Visual Studio 2019 version 16.11.14. This notably includes several proposals approved as Defect Reports (DRs) by the C++ Standard Committee against the C++20 Standard Library that made extensive design changes to and as recently as October 2021. You can now use the complete list of C++20 features in production in a binary compatible way with other supported language version modes. C++20 Complete... Again??!? We previously announced that MSVC had complete...

OpenMP Task Support for C++ in Visual Studio
Apr 26, 2022
Post comments count 11
Post likes count 0

OpenMP Task Support for C++ in Visual Studio

Bran Hagger
Bran Hagger

The MSVC compiler adds support for OpenMP tasks with the /openmp:llvm flag.

Pure Virtual C++ 2022 is Today
Apr 26, 2022
Post comments count 0
Post likes count 0

Pure Virtual C++ 2022 is Today

Sy Brand
Sy Brand

Pure Virtual C++ 2022 is today at 14:00 UTC! Join us on Learn TV for a free one-day virtual conference for the whole C++ community. You can find the schedule here.  

Customizing GitHub Codespaces for C++ Projects
Apr 25, 2022
Post comments count 0
Post likes count 0

Customizing GitHub Codespaces for C++ Projects

Michael Price
Michael Price

A walkthrough for creating a GitHub Codespace, customizing the Codespace development container, and configuring Visual Studio Code for developing in a C++ project such as microsoft/vcpkg-tool.

Pure Virtual C++ 2022 Pre-Conference Sessions Available
Apr 22, 2022
Post comments count 0
Post likes count 0

Pure Virtual C++ 2022 Pre-Conference Sessions Available

Sy Brand
Sy Brand

Our pre-conference sessions for Pure Virtual C++ 2022 are now online. Find them here, and hope to see you at the main event on 26th April! Session list: There's one session on Visual Studio for Unreal Engine and Game Developers which will be uploaded soon.

vcpkg April 2022 Release: artifacts merged to tool repo, tar.exe in Windows 10, GIT_ASKPASS, vcpkg in Arch Linux instructions, and more
Apr 22, 2022
Post comments count 2
Post likes count 0

vcpkg April 2022 Release: artifacts merged to tool repo, tar.exe in Windows 10, GIT_ASKPASS, vcpkg in Arch Linux instructions, and more

Augustin Popa
Augustin Popa

The April 2022 release of the vcpkg package manager is available. This blog post summarizes changes from March 1st, 2022 to March 30th, 2022 for the microsoft/vcpkg and microsoft/vcpkg-tool GitHub repos. Some stats for this period:   Notable Changes vcpkg artifacts merged into Microsoft/vcpkg-tool repo vcpkg artifacts is our preview experience for acquiring binary packages, intended for developer tools like compilers, platform SDKs, and debuggers. This is a major step towards accepting external contributions for the vcpkg artifacts feature. PR: Microsoft/vcpkg-tool#428 &n...

What’s new for C++ Debugging in Visual Studio Code
Apr 20, 2022
Post comments count 3
Post likes count 1

What’s new for C++ Debugging in Visual Studio Code

Julia Reid
Julia Reid

It’s been a minute since our last blog post about C++ in VS Code, but we’ve been working hard on new features and bug fixes! Today, we’re excited to fill you in on the latest and greatest C++ debugger improvements in VS Code, including support for the Apple M1 chip, data breakpoints, and a new run/debug play button! Apple Silicon ARM64 (M1 chip) Last year, we enabled language server support for Apple Silicon ARM64 architecture, which meant you could run the C++ extension’s language server (responsible for things like IntelliSense, code navigation, and autocomplete) natively on the Apple M1 chip. At the time, th...

Pure Virtual C++ 2022 Schedule Available
Apr 13, 2022
Post comments count 0
Post likes count 0

Pure Virtual C++ 2022 Schedule Available

Sy Brand
Sy Brand

Pure Virtual C++ 2022 is a free, one-day virtual conference for the whole C++ community. The schedule is now available. You can find the full set of abstracts, alongside calendar files to download on the website. All times UTC on the 26th April. Yes, I know the times look a bit weird, it'll work out on the day! Look forward to seeing you there!  

New Enumeration Checks in Visual Studio 2022 version 17.2 Preview 3
Apr 12, 2022
Post comments count 6
Post likes count 0

New Enumeration Checks in Visual Studio 2022 version 17.2 Preview 3

Gabor Horvath
Gabor Horvath

New Enumeration Checks in Visual Studio 2022

Sign Up for the Pure Virtual C++ 2022 Conference
Apr 8, 2022
Post comments count 1
Post likes count 0

Sign Up for the Pure Virtual C++ 2022 Conference

Sy Brand
Sy Brand

In the last couple of years we have run Pure Virtual C++, a free one-day virtual conference for the whole C++ community. This month we're doing it again! Sign-up for free on the website to be the first to hear about our program schedule, access our extra on-demand C++ demos, and get more virtual surprises. The live event will run April 26th 14:00-17:00 UTC on Microsoft Learn TV. It will also be streamed to YouTube and videos will be available to watch after the event. The full program will be announced soon, but expect content on C++23, modules, static analysis, embedded C++, and some fun C++ corners yo...

Using GitHub Codespaces and Visual Studio Code for C++ Development
Apr 4, 2022
Post comments count 4
Post likes count 1

Using GitHub Codespaces and Visual Studio Code for C++ Development

Michael Price
Michael Price

GitHub Codespaces and Visual Studio Code lower the barrier to entry for developing C++-based applications and libraries.

Enhancing Game Developer Productivity with Visual Studio 2022
Mar 31, 2022
Post comments count 1
Post likes count 0

Enhancing Game Developer Productivity with Visual Studio 2022

David Li
David Li

In this blog, we will discuss how much faster you can get to code with speedier C++ IntelliSense ready and opening a file. Learn how search improved with faster with C++ Find All References and indexed Find in Files.

C++ Modules in CMake with Visual Studio
Mar 17, 2022
Post comments count 8
Post likes count 1

C++ Modules in CMake with Visual Studio

Will Buik
Will Buik

We’ve seen a lot of excitement around C++ modules since we announced support in the Microsoft C++ compiler and Visual Studio. Ever since, the community has been asking us when CMake support was coming. I am happy to announce that Visual Studio 2022 17.2 Preview 2 has experimental support for C++ modules in CMake projects. One caveat for this early support, is that you must use the Visual Studio (MSBuild) generator. If you want to try it out, you can download the latest preview of Visual Studio today. We are looking forward to hearing your feedback about how modules work in your CMake projects. C++ modules are ...

Visual Studio for remote macOS C++ development
Mar 16, 2022
Post comments count 2
Post likes count 0

Visual Studio for remote macOS C++ development

Sinem Akinci
Sinem Akinci

The latest preview version of Visual Studio is now available to download. In this latest release, users wishing to develop cross platform C++ applications for macOS can now make use of Visual Studio’s Linux tools with CMake to target the Mac. There is some setup required on the Mac side to enable the support, but then the Mac is treated just as any other remote (Linux) target by Visual Studio.  Installation To get started install the latest preview release of Visual Studio 2022 and select the Linux and embedded development with C++ workload. The components you need are selected by default. Setup on the...

Embedded Software Development in Visual Studio Code
Mar 10, 2022
Post comments count 4
Post likes count 3

Embedded Software Development in Visual Studio Code

Marc Goodner
Marc Goodner

In this post we will walk through the new Visual Studio Code Embedded Tools extension. We'll show how to acquire embedded tool dependencies with vcpkg then edit, build, deploy, and debug an Azure RTOS ThreadX project highlighting the new peripheral register and RTOS object views.

Execution and Static Analysis Support for MSVC on Compiler Explorer
Mar 1, 2022
Post comments count 1
Post likes count 0

Execution and Static Analysis Support for MSVC on Compiler Explorer

Sy Brand
Sy Brand

Compiler Explorer is a popular resource for visualizing the assembly output of various compilers, trying out different compiler versions and flags, and testing many popular libraries. We're pleased to announce that, as of today, code execution and static analysis are now available for MSVC on Compiler Explorer. Execution on CE has been one of our highest voted tickets on Developer Community, so we hope many of you will find it useful. The static analysis tool provided is the same as offered in GitHub Actions and in the IDE as background code analysis. To enable code execution, tick the "Execute the code" bo...

GSL 4.0.0 is Available Now
Feb 1, 2022
Post comments count 0
Post likes count 0

GSL 4.0.0 is Available Now

Dmitry Kobets
Dmitry Kobets

GSL 4.0.0 has been released! Here is a summary of the changes.

How we used C++20 to eliminate an entire class of runtime bugs
Jan 13, 2022
Post comments count 2
Post likes count 0

How we used C++20 to eliminate an entire class of runtime bugs

Cameron DaCamara
Cameron DaCamara

C++20 is here and has been supported in MSVC since 16.11, but today's post is not about how you can use it, but rather how we used it to effectively eliminate an entire class of runtime bugs by hoisting a check into compile-time. Let's get right into it! Humble beginnings In compiler design one of the very first things you need is a way to convey to the programmer that their source code has an error or warn them if their code might not behave as expected. In MSVC our error infrastructure looks something like this: The way works is that each has a corresponding string entry which represents the text we want...

Visual Studio Code C++ December 2021 Update: clang-tidy
Dec 14, 2021
Post comments count 4
Post likes count 0

Visual Studio Code C++ December 2021 Update: clang-tidy

Julia Reid
Julia Reid

The latest insiders release of the C++ extension is here, bringing clang-tidy support to VS Code! Clang-tidy is a clang-based C++ linter tool that detects common errors in your code, like style violations and bugs that can be deduced via static analysis. Clang-tidy integration was one of our top asks on GitHub, so we’re excited to announce that it’s ready for you to try! Getting started Do I need to install clang-tidy? Nope! Clang-tidy now comes bundled with the C++ extension. But if you already have clang-tidy installed (and it’s on your environment’s path), the C++ extension will use that one instead. You ca...

The /fp:contract flag and changes to FP modes in VS2022
Dec 14, 2021
Post comments count 0
Post likes count 0

The /fp:contract flag and changes to FP modes in VS2022

Gautham Beeraka (Intel Americas Inc)
Gautham Beeraka (Intel Americas Inc)

The /fp:contract flag and changes to FP modes in VS2022 In this blog we will cover a new feature we have added to the MSVC version 17.0 compiler in VS2022 that impacts the generation of Floating-Point contractions such as Fused Multiply Add (FMA) instructions. We will cover how FMA contractions are supported in pre-VS2022 MSVC compiler releases, a new /fp:contract flag and changes to existing Floating-Point pragmas in VS2022 MSVC compiler allowing explicit control over generation of contractions A contraction, as used here, is where two operations in the source code are performed by a single instruction in th...

Microsoft Visual Studio 2022 and Floating-point to Integer Conversions
Dec 13, 2021
Post comments count 1
Post likes count 0

Microsoft Visual Studio 2022 and Floating-point to Integer Conversions

John Morgan (Intel Corporation)
John Morgan (Intel Corporation)

Microsoft Visual Studio 2022 and Floating-point to Integer Conversions Quick Summary: See also the MSDN documentation on /fpcvt here. Introduction As some of you may be aware, Microsoft Visual Studio 2019 changed some floating-point to integer conversions for Intel Architecture (IA). When targeting 32-bit IA (x86), most conversions match the Intel AVX-512 conversion instructions. For signed integers this is the same as Visual Studio 2017. With unsigned integers the results of invalid conversions can be different, as I will explain later. With 64-bit IA (x64), the AVX-51...

Embedded Software Development in Visual Studio
Dec 6, 2021
Post comments count 15
Post likes count 2

Embedded Software Development in Visual Studio

Marc Goodner
Marc Goodner

In this post we will walk you through Visual Studio installation of the embedded workload, how to acquire embedded tool dependencies with vcpkg, then demonstrate edit, build, deploy, and debugging directly in Visual Studio with new peripheral register and RTOS object views. We will demonstrate all of this with an Azure RTOS ThreadX project.

Bootstrap your dev environment with vcpkg artifacts
Dec 6, 2021
Post comments count 14
Post likes count 1

Bootstrap your dev environment with vcpkg artifacts

Marc Goodner
Marc Goodner

Updated May 11, 2022: Using your own registry section revised to reflect metadata format changes. We are happy to announce a new experience for acquiring artifacts using vcpkg. We define an artifact as a set of packages required for a working development environment. Examples of relevant packages include compilers, linkers, debuggers, build systems, and platform SDKs. With this important change, vcpkg can not only download and build your libraries from source, it can also bootstrap the rest of your environment, acquiring pre-built binary dependencies for your projects. The experience is in preview and curre...

Makefile Tools December 2021 Update: Problem Matchers and Compilation Database Generation
Dec 6, 2021
Post comments count 0
Post likes count 0

Makefile Tools December 2021 Update: Problem Matchers and Compilation Database Generation

Julia Reid
Julia Reid

The December 2021 update of the Makefile Tools extension for Visual Studio Code is here, bringing you support for problem matchers (to easily view errors and warnings in the editor), the ability to generate a compile_commands.json file for your project, and a bunch of other enhancements and bug fixes! To find out more about all the enhancements, check out our release notes on GitHub. Problem matchers If you’ve used the C++ extension for VS Code, you’re probably familiar with the Problems panel, where you can navigate through a list of compiler errors and warnings found in your project. VS Code uses a problem ma...

C++ build throughput investigation and tune up
Nov 19, 2021
Post comments count 3
Post likes count 3

C++ build throughput investigation and tune up

olgaark
olgaark

Building C++ code is a complex process, launching many build tools in parallel and often running for a long time. It is always desirable to make it faster, but also a challenge to understand what the most effective way would be to achieve this. We’d like to share some techniques we use to get a "bigger" picture of the build, as well as tools that can help to see what is taking time in a particular part of the build. We’ll also talk about MSBuild project options which can improve build parallelism without overwhelming the system, as well as other (not immediately obvious) options which might affect build throug...

What’s new for C++ cross-platform developers in Visual Studio 2022
Nov 18, 2021
Post comments count 5
Post likes count 1

What’s new for C++ cross-platform developers in Visual Studio 2022

Erika Sweet
Erika Sweet

Visual Studio 2022 is available now! Check out the video below to learn what’s new for C++ developers who are building for more than just Windows, or who are developing with an eye to open source. This video covers:  Contact us Have questions or comments about Visual Studio 2022? Want to share feedback with our team? You can contact us at [email protected] or on Twitter (@VisualC). The best way to file a bug or suggest a feature is with the Send Feedback button in the upper right-hand corner of the IDE. See How to report a problem with Visual Studio or Visual Studio Install...

Microsoft C++ Code Analysis with GitHub Actions
Oct 26, 2021
Post comments count 3
Post likes count 0

Microsoft C++ Code Analysis with GitHub Actions

Daniel Winsor
Daniel Winsor

Summary of your post, shown on the home page next to the featured image

18x Faster IntelliSense for Unreal Engine Projects in Visual Studio 2022
Oct 25, 2021
Post comments count 15
Post likes count 1

18x Faster IntelliSense for Unreal Engine Projects in Visual Studio 2022

David Li
David Li

We joined forces with Epic Games to bring faster semantic highlighting and IntelliSense ready to Visual Studio 2022 for Unreal Engine developers. In this blog post, we will detail how we worked with the Unreal Engine team to significantly speed up IntelliSense ready by 18x.

Microsoft C++ Team at CppCon 2021
Oct 25, 2021
Post comments count 0
Post likes count 0

Microsoft C++ Team at CppCon 2021

Sy Brand
Sy Brand

The Microsoft C++ team has an exciting lineup of sessions at CppCon 2021. Many of us will also be present at our team’s booth in the main hall for the first two days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us. We’re also running a survey on the C++ ecosystem. If you have a moment, please take our survey, it's quick. Here’s the lineup: Monday, October 25th 15:15 – 16:15 (MDT): Implementing C++ Modules: Lessons Learned, Lessons Abandoned by Gabrie...

A Race Condition in .NET Finalization and its Mitigation for C++/CLI
Oct 15, 2021
Post comments count 3
Post likes count 0

A Race Condition in .NET Finalization and its Mitigation for C++/CLI

Tanveer Gani
Tanveer Gani

Race conditions can occur in .NET finalization. This article explains the solution implemented in MSVC.

Improved Null Pointer Dereference Detection in Visual Studio 2022 version 17.0 Preview 4
Oct 8, 2021
Post comments count 2
Post likes count 0

Improved Null Pointer Dereference Detection in Visual Studio 2022 version 17.0 Preview 4

Gabor Horvath
Gabor Horvath

Improved Null Pointer Dereference Detection in Visual Studio 2022

Static Analysis Fixes in Visual Studio 2019 version 16.11
Sep 13, 2021
Post comments count 2
Post likes count 0

Static Analysis Fixes in Visual Studio 2019 version 16.11

Gabor Horvath
Gabor Horvath

List of Code Analysis Fixes in Visual Studio 2019 16.11

MSVC C++20 and the /std:c++20 Switch
Sep 2, 2021
Post comments count 2
Post likes count 0

MSVC C++20 and the /std:c++20 Switch

Daniel Griffing
Daniel Griffing

We are excited to announce that in Visual Studio 2019 version 16.11, we have added the switch to the set of language mode switches available. The addition of this switch indicates that we’ve reached a point of sufficient stabilization of the MSVC C++20 feature set for it be used in production, with full support in VS servicing updates. This blog post focuses on describing our level of C++20 feature support, compiler-supported extensions, and the remaining feature set differences between MSVC and the ISO C++ standard as of Visual Studio 2019 version 16.11 and Visual Studio 2022 version 17.0 C++ Language Modes...

C++20 Coroutine Improvements in Visual Studio 2019 version 16.11
Aug 31, 2021
Post comments count 3
Post likes count 1

C++20 Coroutine Improvements in Visual Studio 2019 version 16.11

Jonathan Emmett
Jonathan Emmett

This post includes contributions from Terry Mahaffey and Ramkumar Ramesh. We last blogged about coroutine support in Visual Studio 2019 version 16.8. In the releases since 16.8 we've introduced several new coroutine features and improvements. This post is a round up of those improvements, all available in Visual Studio 2019 16.11. Debugging Improvements Since Visual Studio 2019 version 16.9, stepping into a coroutine call will now land directly in the coroutine body (unless it is set to initially suspend, in which case the step becomes a “step over”). Stepping over a will land in the logical statement f...

New Compiler Warnings for Dynamic Initialization and User Defined Sections
Aug 24, 2021
Post comments count 6
Post likes count 0

New Compiler Warnings for Dynamic Initialization and User Defined Sections

Xiang Fan
Xiang Fan

We've added two new warnings to MSVC for misuses of binary sections reserved for the compiler. This short post will explain the issues which they warn against, and potential fixes for your code. The MSVC C++ compiler provides several ways to create sections and place data in them. The linker will convert them into the 'sections' in the PE (Portable Executable) format. The compiler also creates some sections itself. One example is the section , which is used to implement C++ dynamic initialization (there are other sections for this purpose, too). The name of the section is mentioned in articles like CRT Init...

Attach to a Remote Process with LLDB in Visual Studio 2022 Preview 3
Aug 11, 2021
Post comments count 1
Post likes count 0

Attach to a Remote Process with LLDB in Visual Studio 2022 Preview 3

Erika Sweet
Erika Sweet

You can now use Attach to Process to remote debug processes with GDB or LLDB in Visual Studio. The ability to attach to a process running on a remote system with GDB was added in Visual Studio 2019. The ability to attach to a process with LLDB is new in Visual Studio 2022 Preview 3. Remote debugging in Visual Studio is especially valuable for teams who write cross-platform C++ code that runs on Windows and Linux or macOS. For example, if you use Windows + Visual Studio as your primary development environment, then you may need to occasionally debug code running on Linux or macOS. Rather than switching platform...

ARM64EC Support in Visual Studio
Aug 10, 2021
Post comments count 8
Post likes count 0

ARM64EC Support in Visual Studio

Moyo Okeremi
Moyo Okeremi

ARM64EC (“Emulation Compatible”) is a new application binary interface for building apps for Windows 11 on ARM. With ARM64EC, you can build new native apps that can run on ARM or incrementally transition existing x64 apps to native performance on ARM. With Visual Studio, you can start building your projects as ARM64EC and enjoy the benefits.

Moving a project to C++ named Modules
Aug 10, 2021
Post comments count 19
Post likes count 2

Moving a project to C++ named Modules

Cameron DaCamara
Cameron DaCamara

There is a lot of hype (and perhaps restraint) to using modules in projects. The general blocker tends to be build support, but even with good build support there is a distinct lack of useful resources for practices around moving projects to using named modules (not just header units). In this blog we will take a small project I created, analyze its components, draft up a plan for modularizing it, and execute that plan. Overview Tools used For the purposes of this project, we will be using the following tools: Project description I remember when I was young...

Edit Your C++ Code while Debugging with Hot Reload in Visual Studio 2022
Jul 29, 2021
Post comments count 0
Post likes count 0

Edit Your C++ Code while Debugging with Hot Reload in Visual Studio 2022

David Li
David Li

In Visual Studio 2022 Preview 2, we are happy to announce that Hot Reload is now supported for C++. Hot Reload for C++, powered by Edit and Continue, is a new way of editing your code during debugging.

Visual Studio Code C++ July 2021 Update: Disassembly View, Macro Expansion and Windows ARM64 Debugging
Jul 28, 2021
Post comments count 11
Post likes count 0

Visual Studio Code C++ July 2021 Update: Disassembly View, Macro Expansion and Windows ARM64 Debugging

Julia Reid
Julia Reid

The July 2021 update of the C++ extension for Visual Studio Code is here, bringing you brand new features— such as a Disassembly View while debugging, inline macro expansions, and debug support for Windows ARM64 architecture—along with a bunch of enhancements and bug fixes. To find out more about all the enhancements, check out our release notes on GitHub. Disassembly View We’re excited to announce that Disassembly View— our #1 upvoted GitHub issue (#206)— is publicly available in VS Code Insiders! Disassembly View allows you to debug assembly code corresponding to the instructions created by your compiler. It’...

Using C++ Modules in MSVC from the Command Line Part 1: Primary Module Interfaces
Jul 21, 2021
Post comments count 3
Post likes count 0

Using C++ Modules in MSVC from the Command Line Part 1: Primary Module Interfaces

Cameron DaCamara
Cameron DaCamara

In this three-part series we will explore how to build modules and header units from the command line as well as how to use/reference them. The goal of this post is to serve as a brief tour of compiling and using primary module interfaces from the command line and the options we use. Note: This tutorial will focus primarily on dealing with IFC and object file output. Other types of compiler output such as PDB info are not mentioned. Overview Summary of C++ modules options Basics of building a module interface For the content in this section, we will assume that you have an appropriate ...

Build and Debug C++ with WSL 2 Distributions and Visual Studio 2022
Jul 14, 2021
Post comments count 0
Post likes count 1

Build and Debug C++ with WSL 2 Distributions and Visual Studio 2022

Erika Sweet
Erika Sweet

Visual Studio 2022 introduces a native WSL 2 toolset for C++ development. This toolset is available now in Visual Studio 2022 version 17.0 Preview 2. WSL 2 is the new, recommended version of the Windows Subsystem for Linux (WSL) architecture that provides better Linux file system performance, GUI support, and full system call compatibility. Visual Studio’s WSL 2 toolset allows you to build and debug C++ code on WSL 2 distros from Visual Studio without ever adding an SSH connection. You can already build and debug C++ code on WSL 1 distros using the native WSL 1 toolset introduced in Visual Studio 2019 version 1...

Code Scanning C++ with GitHub Actions
Jul 7, 2021
Post comments count 2
Post likes count 0

Code Scanning C++ with GitHub Actions

Nick Uhlenhuth
Nick Uhlenhuth

Last year, GitHub released code scanning, which enables developers to incorporate security checks into their CI/CD environment and developer workflow. This post demonstrates the basics of using CodeQL, the analysis engine behind code scanning, with GitHub Actions. What is CodeQL? CodeQL is an analysis engine that automates security checks by running queries against a database generated from your codebase. This CodeQL database is created during the build process and represents the source code in relational form. By default, code scanning runs standard CodeQL queries written by GitHub researchers and the communit...

Customized Warning Levels and Code Analysis for External Headers
Jun 30, 2021
Post comments count 7
Post likes count 0

Customized Warning Levels and Code Analysis for External Headers

Will Buik
Will Buik

If you have tried to keep your code clean by selecting strict compiler warning levels or code analysis rulesets, you likely know how frustrating it can be to see these warnings for headers that are not part of your project. To alleviate this, we’ve made it easy to mark headers as external to your project in the latest preview Visual Studio 2019. This is something we have been working on for a while with help and feedback from the community. Some of you may remember our previous post, Broken Warnings Theory, when we added experimental external header support to the Microsoft C++ Compiler. I’m happy to announce tha...

STL Visualizers on GitHub
Jun 23, 2021
Post comments count 6
Post likes count 0

STL Visualizers on GitHub

Anju Del Moral Gonzalez
Anju Del Moral Gonzalez

We are happy to announce that now it’s possible to contribute to the STL Visualizers for Visual Studio's debugger on GitHub. A visualizer is a file with .natvis extension that allows you to manipulate the way native types appear in the debugger's watch window.  We've been working on fixing existing issues with the visualizers and augmenting them, but with C++20 coming with new types, they have been falling behind. We decided to open source them so that the community can benefit and collaborate.   What’s Available?   The file is now in the GitHub repo under stl\debugger\STL.natvis. We also have...

Address Sanitizer Now in “Early Release” for Xbox Developers
Jun 22, 2021
Post comments count 0
Post likes count 0

Address Sanitizer Now in “Early Release” for Xbox Developers

David Li
David Li

Address Sanitizer is now available on Xbox, developers can leverage this powerful technology to help debug memory issues in their titles.  Combined with the crash dump changes detailed here, it should provide all the flexibility required to support your automated tests suites and enable you to find issues quickly and easily.

Static Analysis Fixes, Improvements, and Updates in Visual Studio 2019 version 16.10
Jun 10, 2021
Post comments count 0
Post likes count 0

Static Analysis Fixes, Improvements, and Updates in Visual Studio 2019 version 16.10

Jordan Maples
Jordan Maples

The C++ static analysis team is committed to making your C++ coding experience as safe as possible. We are adding richer code safety checks and addressing high impact customer feedback bugs posted on the  C++ Developer Community page. Thank you for engaging with us and giving us great feedback on the past releases and early previews leading to this point. Below is the compilation of improvements and bug fixes that were made from Visual Studio 2019 versions 16.9 to 16.10 for code analysis and CppCoreCheck. New features: Analysis crash fixes: Bug fixes and optimizations:...

<format> in Visual Studio 2019 version 16.10
Jun 9, 2021
Post comments count 28
Post likes count 0

<format> in Visual Studio 2019 version 16.10

Charlie Barto
Charlie Barto

C++20 adds a new text formatting facility to the standard library, designed primarily to replace and friends with a fast and type safe interface. The standardized library is based on the existing {fmt} library, so users of that library will feel at home. Before diving into how works I want to thank Victor Zverovich, Elnar Dakeshov, Casey Carter, and miscco, all of whom made substantial contributions to this feature, and were the reason why we could complete it so quickly. Overview To start using you just need to be using Visual Studio 2019 version 16.10 or later and you need to be compiling with . You can...

C++20’s Extensions to Chrono Available in Visual Studio 2019 version 16.10
Jun 1, 2021
Post comments count 3
Post likes count 0

C++20’s Extensions to Chrono Available in Visual Studio 2019 version 16.10

Miya Natsuhara
Miya Natsuhara

While the header has been available as part of the STL since C++11, among the changes included in C++20 there were several extensions to chrono including support for calendrical types, time zones, leap seconds, and integration with format. A great deal of innovation and work was required in order to complete these additional features; shipping these new C++20 additions so soon would not have been possible without the amazing support of the open-source community. In particular, I would like to recognize the significant contributions from Matt Stephanson, statementreply, and Daniel Marshall in helping complete our...

Preview of using CMake Presets for Azure Sphere development
May 27, 2021
Post comments count 1
Post likes count 0

Preview of using CMake Presets for Azure Sphere development

Marc Goodner
Marc Goodner

We are happy to announce that CMake Presets preview support is available in the Visual Studio 16.10 release as well as CMake Tools version 1.7 for Visual Studio Code. Erika introduced CMake Presets and why you should use them, this post will focus on how they can be used for Azure Sphere development across Visual Studio, VS Code, and GitHub Actions for consistent build settings across your development team and CI system. Azure Sphere is a comprehensive IoT security solution that is beyond the scope of this article. Azure Sphere projects are CMake based, and application development is in C (get started here)...

C++20 Ranges are complete in Visual Studio 2019 version 16.10
May 26, 2021
Post comments count 1
Post likes count 0

C++20 Ranges are complete in Visual Studio 2019 version 16.10

Casey Carter
Casey Carter

We are proud to announce completion of our implementation of C++20 Ranges in the Standard Library in the VS2019 v16.10 release under. We announced the first useful user-visible parts of Ranges in VS 2019 v16.6 in mid 2020, the trickle accelerated into a gushing stream, and the final parts are now in place. This represents a huge body of work with input from multiple open-source contributors over the last two years. Ironically enough, ranges are nothing new to the Standard Library. STL algorithms have always operated on ranges of elements whose bounds are denoted by an iterator that denotes the first element an...

How to start using registries with vcpkg
May 24, 2021
Post comments count 0
Post likes count 0

How to start using registries with vcpkg

Nicole Mazzuca
Nicole Mazzuca

For many users of vcpkg, the built-in repository of packages is completely sufficient. If you only need public, non-experimental libraries, the default vcpkg registry is completely fine. However, once you go outside of this world - once you have company-internal libraries, or you want to use experimental libraries, the recommended solution is to use a registry. Quite a few people have already set up their own registries, and if you want to learn to set up your own, you can check out the last blogpost. However, if you want to use an existing registry, this tutorial is for you. We also have reference document...

All vcpkg enterprise features now generally available: versioning, binary caching, manifests and registries
May 19, 2021
Post comments count 3
Post likes count 0

All vcpkg enterprise features now generally available: versioning, binary caching, manifests and registries

Augustin Popa
Augustin Popa

We are announcing today that all major vcpkg enterprise features are no longer experimental. The latest vcpkg release makes versioning, binary caching, manifests and registries generally available to any developer, team or enterprise. We have steadily been adding to vcpkg over the years. What started as a small open source project to migrate developers to newer versions of Visual Studio has expanded into a cross-platform C/C++ library manager with over 1600 libraries that can be used in a wide variety of environments to serve the entire C/C++ ecosystem. In this blog post, we go over the latest vcpkg pr...

Microsoft C++ Code Analysis supports SARIF 2.1
May 13, 2021
Post comments count 0
Post likes count 0

Microsoft C++ Code Analysis supports SARIF 2.1

Hwi-sung Im
Hwi-sung Im

Starting with Visual Studio 16.8, MSVC Code Analysis officially supports SARIF 2.1.0 standard. SARIF is an industry standard for representing static analysis logs and we've been one of the earliest collaborators with the SARIF Technical Committee. Behind the scenes, analysis log files in the SARIF format powers Visual Studio IDE to provide a richer experience that was not possible with the legacy XML logs. In this blog post we will present one of those enhanced experiences – code analysis defects with different severity levels in Error List and color-coded squiggles for offending code segments.    What is SAR...

OpenMP Updates and Fixes for C++ in Visual Studio 2019 version 16.10
May 12, 2021
Post comments count 8
Post likes count 0

OpenMP Updates and Fixes for C++ in Visual Studio 2019 version 16.10

Chris Pulido
Chris Pulido

In our previous blog post about improved OpenMP support in Visual Studio, we announced the addition of the -openmp:llvm switch in Visual Studio 2019 version 16.9 to enable compiled programs to target LLVM’s OpenMP runtime library for the x64 architecture. This switch supports all the OpenMP 2.0 directives that -openmp supports, as well as unsigned integer indices in parallel for loops, and a subset of the SIMD directives that are supported under -openmp:experimental. It also enabled a few correctness fixes. Starting in Visual Studio 2019 version 16.10 Preview 2, the -openmp:llvm switch now works for x86 and arm64...

New Static Analysis Rule for Bounds Checking
May 11, 2021
Post comments count 2
Post likes count 0

New Static Analysis Rule for Bounds Checking

Jordan Maples
Jordan Maples

We have added a new experimental static analysis rule in Visual Studio 16.10 version Preview 3 - C26458, . The new warning is a more precise and less noisy version of warning C26446, . Both warnings analyse standard containers for unchecked element access and they both share the warning message: “Prefer to use instead of unchecked subscript operator (bounds.4).” This new warning, however, uses path sensitive analysis to track buffer size validation calls to provide a less noisy, more targeted warning compared to C26446. Path sensitive analysis is not an inexpensive operation: the complexity and time required ...

Finding Bugs with AddressSanitizer: Patterns from Open Source Projects
May 10, 2021
Post comments count 3
Post likes count 0

Finding Bugs with AddressSanitizer: Patterns from Open Source Projects

Kevin Cadieux
Kevin Cadieux

AddressSanitizer (ASan) was officially released in Visual Studio 2019 version 16.9. We recently used this feature to find and fix a bug in the MSVC compiler itself. To further validate the usefulness of our ASan implementation, we also used it on a collection of widely used open source projects where it found bugs in Boost, Azure IoT C SDK, and OpenSSL. In this article, we present our findings by describing the type of bugs that we found and how they presented themselves in these projects. We provide links to the GitHub commits where these bugs were fixed so you can get a helpful look at what code changes were in...

2x-3x Performance Improvements for Debug Builds
May 7, 2021
Post comments count 3
Post likes count 0

2x-3x Performance Improvements for Debug Builds

Pranav Kant
Pranav Kant

We have made substantial runtime performance improvements in the x86/x64 C++ compiler for Visual Studio's default debug configuration. For Visual Studio 2019 version 16.10 Preview 2, we measure 2x - 3x speedup for programs compiled in debug mode. These improvements come from reducing the overhead introduced by runtime checks (/RTCs) which are enabled by default.  Default debug configuration  When you compile your code in debug configuration in Visual Studio, there are some flags that are passed to the C++ compiler by default. Most relevant to this blog post are /RTC1, /JMC and /ZI.   While all of these flags...

Ignoring Automatic Initialization for Code Analysis
May 6, 2021
Post comments count 6
Post likes count 0

Ignoring Automatic Initialization for Code Analysis

Gabor Horvath
Gabor Horvath

Reading uninitialized memory is one of the major sources of security vulnerabilities in C and C++ programs. Microsoft developed many tools to find such errors including compiler warnings, static analysis checks, and more recently: code instrumentation.  For a more detailed overview of uninitialized memory related vulnerabilities and mitigations please refer to Microsoft Security Response Center’s great blog post. This blog post summarizes the potential interactions between code analysis and code instrumentation and improvements we've made in Visual Studio 2019 version 16.9.1.  When we turn on the automatic ini...

Pure Virtual C++ 2021 is Today
May 3, 2021
Post comments count 0
Post likes count 0

Pure Virtual C++ 2021 is Today

Sy Brand
Sy Brand

Pure Virtual C++, a free one-day virtual conference for the whole C++ community, is starting today (May 3rd) at 14:30 UTC. You can watch it and interact with the speakers at Learn TV. There'll be sessions on C++20 modules, CMake, vcpkg, and code analysis. All of our pre-conference demos, including what's new in C++20 support in MSVC, are now live on YouTube. Hope to see you there!

Pure Virtual C++ 2021 Schedule Available
Apr 20, 2021
Post comments count 8
Post likes count 0

Pure Virtual C++ 2021 Schedule Available

Sy Brand
Sy Brand

The schedule for Pure Virtual C++ 2021 is now live on the event website. Remember to sign up to be the first to access our extra on-demand C++ demos and get more virtual surprises. Schedule All times are on Monday 3rd May 2021 UTC. Abstracts and speaker bios are available on the website.

CMake Presets integration in Visual Studio and Visual Studio Code
Apr 20, 2021
Post comments count 15
Post likes count 0

CMake Presets integration in Visual Studio and Visual Studio Code

Erika Sweet
Erika Sweet

CMakePresets.json was released in CMake 3.19 and 3.20 and allows users to specify common configure, build, and test options and share them with others. We have added support for CMakePresets.json in Visual Studio and the CMake Tools extension for Visual Studio Code. You can now invoke CMake with the same CMakePresets.json file in Visual Studio, in Visual Studio Code, in a Continuous Integration pipeline, and from the CLI on Windows, Linux, and macOS. Our CMake Presets integration is now available in preview in Visual Studio 2019 version 16.10 Preview 2 and CMake Tools version 1.7. Why should I use CMake Prese...

Visual Studio Code C++ Extension April 2021 Update: CUDA C/C++ IntelliSense and Apple Silicon Support
Apr 15, 2021
Post comments count 2
Post likes count 0

Visual Studio Code C++ Extension April 2021 Update: CUDA C/C++ IntelliSense and Apple Silicon Support

Julia Reid
Julia Reid

The April 2021 update of the Visual Studio Code C++ extension is now available! This latest release offers brand new features—such as IntelliSense for CUDA C/C++ and native language server support for Apple Silicon— along with a bunch of enhancements and bug fixes. To find out more about all the enhancements, check out our release notes on GitHub.  CUDA C/C++ IntelliSense  We’re excited to announce that the C++ extension now provides IntelliSense for CUDA C/C++! CUDA is a parallel programming platform, enabling developers to interact with the GPU. Microsoft and NVIDIA have partnered together to light up the CUD...

MSVC Backend Updates in Visual Studio 2019 version 16.10 Preview 2
Apr 14, 2021
Post comments count 1
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 version 16.10 Preview 2

Helena Gregg
Helena Gregg

In Visual Studio 2019 version 16.10 Preview 2 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a brief list of improvements for you to review.  Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2019 and give it a try! Any feedback is welcome. We can be reached via the comments below, D...

Finding Bugs with AddressSanitizer: MSVC Compiler
Apr 7, 2021
Post comments count 6
Post likes count 0

Finding Bugs with AddressSanitizer: MSVC Compiler

Augustin Popa
Augustin Popa

Special thanks to Aaron Gorenstein for authoring this blog post. The AddressSanitizer (ASan) is generally available for MSVC since the recently-released Visual Studio 2019 version 16.9. We’ve already shown how easy it can be to find bugs in even production-ready code like EASTL. Here I’ll share an example of how it found a real bug in the MSVC compiler itself. The idea was straightforward: ASan finds bugs, and we’re always interested in finding bugs in the compiler. Just like you can turn ASan on in your projects and run your tests, we’ve been turning on ASan on our project (the compiler) and running it on...

Sign Up for the Pure Virtual C++ 2021 Conference
Apr 6, 2021
Post comments count 5
Post likes count 0

Sign Up for the Pure Virtual C++ 2021 Conference

Sy Brand
Sy Brand

Last year we ran the first Pure Virtual C++, a free one-day virtual conference for the whole C++ community. This May we're doing it again! Sign-up for free on the website to be the first to hear about our program schedule, access our extra on-demand C++ demos, and get more virtual surprises. The live event will run May 3rd 14:30-17:30 UTC on Microsoft Learn TV. It will also be streamed to YouTube and videos will be available to watch after the event. The full program will be announced soon, but expect content on C++20 modules, code analysis, CMake, vcpkg, and MSVC's progress on conformance. In addition ...

vcpkg Host Dependencies for Cross-Compilation
Mar 31, 2021
Post comments count 1
Post likes count 0

vcpkg Host Dependencies for Cross-Compilation

Robert Schumacher
Robert Schumacher

If you’re not familiar with our C++ library manager vcpkg, welcome! This post covers an intermediate/advanced topic, so you may want to first get an overview and try things out from the vcpkg GitHub page or some of our previous blogs.   Introduction One of the best features of C++ is that it generates tailored, specialized code for each specific machine, enabling you to squeeze every ounce of performance per watt. It enables clean abstractions to coexist peacefully with low-level platform-specific bit twiddling. However, this comes at a price for many developers that venture beyond their own machine: yo...

Static Analysis Fixes, Improvements, and Updates in Visual Studio 2019 16.9
Mar 17, 2021
Post comments count 17
Post likes count 0

Static Analysis Fixes, Improvements, and Updates in Visual Studio 2019 16.9

Jordan Maples
Jordan Maples

MSVC static analysis update for Visual Studio 16.9.

IntelliSense Improvements in Visual Studio 2019
Mar 10, 2021
Post comments count 14
Post likes count 0

IntelliSense Improvements in Visual Studio 2019

Will Buik
Will Buik

We’ve made many great improvements to C++ IntelliSense over the course of the Visual Studio 2019 release. We’ve collected a few of the highlights in case you are interested in upgrading to Visual Studio 2019 or just want to learn how to be more productive when writing C++ code. If you have followed our blog since the 2019 Previews, you may be familiar with some of these features already. We hope you find this collection helpful. If you want to try all these features out, please grab the latest release of Visual Studio 2019. Many of these features are rooted in community suggestions. If you have any suggestions...

Address Sanitizer for MSVC Now Generally Available
Mar 9, 2021
Post comments count 22
Post likes count 0

Address Sanitizer for MSVC Now Generally Available

Augustin Popa
Augustin Popa

 This post was last updated on March 10th, 2021. Special thanks to Aaron Gorenstein who provided most of the content for this blog post. Special thanks as well to Kevin Cadieux and Jim Radigan who also made contributions.   You can check out a demo on this feature in the latest Visual Studio Toolbox episode on YouTube: Visual Studio Toolbox Live - What's New in Visual Studio 2019 version 16.9? - YouTube To get started with this experience, check out our documentation. --- We’re thrilled to announce that as of Visual Studio 2019 version 16.9, the C++ Address Sanitizer (ASan) for MSVC experience is f...

Microsoft C++ Team at ACCU 2021
Mar 8, 2021
Post comments count 0
Post likes count 0

Microsoft C++ Team at ACCU 2021

Erika Sweet
Erika Sweet

Sy Brand and Erika Sweet from the Microsoft C++ Team will be presenting at ACCU 2021 this week. Come say hi in the virtual conference space and let us know if you have any questions about our talks, products, or anything else. We also recommend dropping by the #include <C++> table in the expo hall to learn more about their community.   Dynamic Polymorphism with Code Injection and Metaclasses – Sy Brand   Wednesday, 10 March 11:00 – 12:30 GMT   Dynamic polymorphism in C++ has historically meant virtual functions and inheritance. However, these form only one possible design for solving this problem, and ...

Remote Debug Support in Visual Studio 2019
Feb 26, 2021
Post comments count 2
Post likes count 0

Remote Debug Support in Visual Studio 2019

Lisbeth Cardoso Guerra
Lisbeth Cardoso Guerra

Visual Studio 2019 offers remote debug support for MSBuild and CMake projects targeting Windows and Linux. Thanks to remote debugging, our customers can target a wider, more diverse range of scenarios. We offer the flexibility to customize your deployment and automatically copy any dependencies needed to the target machine.

Registries: Bring your own libraries to vcpkg
Feb 25, 2021
Post comments count 2
Post likes count 5

Registries: Bring your own libraries to vcpkg

Augustin Popa
Augustin Popa

Special thanks to Nicole Mazzuca for providing the content of this blog post. Are you working on a C++ project with library dependencies? Are you tired of maintaining a custom-built package management workflow with duct tape and git submodules? Then you should consider trying out a package manager. Perhaps you have been side-eyeing vcpkg for a while, and it looks like the perfect solution for your team, but for one problem: not all your dependencies are open source! Your company has internal libraries that they expect everyone to use too.   Can vcpkg work with non-open-source dependencies? Yes! Up u...

Take control of your vcpkg dependencies with versioning support
Feb 18, 2021
Post comments count 8
Post likes count 0

Take control of your vcpkg dependencies with versioning support

Augustin Popa
Augustin Popa

Special thanks to Victor Romero for putting together the content for this blog post. We have an exciting new feature to announce in vcpkg: the long-awaited and highly requested package versioning! This feature makes it possible to install specific versions of dependencies and control installed versions over time. In order to use this feature, a vcpkg.json manifest file must be present in your repo to declare dependencies. Versioning is not currently available for libraries installed via the command line (i.e. commands). The versioning feature is completely optional – you can choose not to specify library vers...

Now announcing: Makefile support in Visual Studio Code!
Feb 17, 2021
Post comments count 3
Post likes count 2

Now announcing: Makefile support in Visual Studio Code!

Julia Reid
Julia Reid

We are excited to announce a brand-new extension for building and debugging Makefile projects in Visual Studio Code: Makefile Tools (preview)! The extension is in pilot stages, but we’ve curated a list of over 70 popular opensource Makefile projects that work with Makefile Tools. Give it a try and let us know what you think! Installing the extension First, install the Makefile Tools extension from the VS Code Marketplace. Activating the extension Once the extension is installed, it will activate when it finds a Makefile in your project’s root folder. If your project’s Makefile is not in the root folde...

Visual Studio Code C++ Extension: Cross-Compilation IntelliSense Configurations
Feb 9, 2021
Post comments count 1
Post likes count 0

Visual Studio Code C++ Extension: Cross-Compilation IntelliSense Configurations

Julia Reid
Julia Reid

The February 2021 update of the Visual Studio Code C++ extension is now available! This latest release provides support for cross-compilation IntelliSense configurations and over 60 bug fixes! To find out more about all the enhancements, check out our release notes on GitHub. Cross-compilation IntelliSense configurations With this latest release, you can configure the extension to provide proper IntelliSense when compiling for a different platform than your host OS. That’s right— platform, not just architecture. The C++ extension no longer hardcodes system defines based on your host OS; it’ll use the system def...

Improved OpenMP Support for C++ in Visual Studio
Feb 9, 2021
Post comments count 14
Post likes count 0

Improved OpenMP Support for C++ in Visual Studio

Bran Hagger
Bran Hagger

In Visual Studio 2019 version 16.9 we shipped the first stage in our plan to support newer versions of the OpenMP standard in C++ under the -openmp:llvm flag. This flag currently enables several correctness fixes and the use of unsigned integers in parallel for loops.

Abbreviated Function Templates and Constrained Auto
Feb 4, 2021
Post comments count 8
Post likes count 4

Abbreviated Function Templates and Constrained Auto

Sy Brand
Sy Brand

Declaring function templates in C++ has always been quite verbose. C++20 added a new way of doing so that is more terse and more consistent with lambdas: abbreviated function templates. This short post will show how to use this syntax and how it applies to C++20 concepts. Abbreviated Function Templates C++11 introduced lambdas, which look like this: You can only call this lambdas with arguments of and . However we frequently use lambdas in situations where the types would be difficult to spell out in full (especially when using features like ranges). C++14 allowed you to make lambdas which can be called wit...

Playground Games and Turn 10 Studios See 18.2X and 4.95X Link Time Improvements Respectively on Visual Studio 2019
Feb 2, 2021
Post comments count 2
Post likes count 0

Playground Games and Turn 10 Studios See 18.2X and 4.95X Link Time Improvements Respectively on Visual Studio 2019

David Li
David Li

The C++ team at Visual Studio has delivered substantial compile and link time improvements throughout Visual Studio 2019. Playground Games and Turn 10 Studios shares their link time improvement wins.

Seamlessly Accelerate CMake Projects in Visual Studio with Incredibuild
Jan 27, 2021
Post comments count 3
Post likes count 0

Seamlessly Accelerate CMake Projects in Visual Studio with Incredibuild

Nick Uhlenhuth
Nick Uhlenhuth

Visual Studio 2017 shipped with first-class CMake support. Since then, we’ve continued to improve our CMake support by adding new features based on your feedback. We previously blogged about the built-in Incredibuild support for accelerating and visualizing your vcxproj projects, and many of you asked to get this same level of support for your CMake projects. We’re happy to announce that Incredibuild can now be used to accelerate the Windows builds of your CMake projects from within Visual Studio. Incredibuild Recap The backbone of Incredibuild’s offering, Virtualized Distributed Processing™ enables a workload ...

Blizzard Diablo IV debugs Linux core dumps from Visual Studio
Jan 26, 2021
Post comments count 6
Post likes count 0

Blizzard Diablo IV debugs Linux core dumps from Visual Studio

Erika Sweet
Erika Sweet

Blizzard is using Visual Studio 2019 to debug Linux core dumps on WSL. The following blog post is written by Bill Randolph, a Senior Software Engineer at Blizzard working on the development of Diablo IV. Thanks for your partnership, Bill! Introduction On Diablo IV we develop all our code on Windows and compile for multiple platforms.  This includes our servers, which run on Linux.  (The code includes conditional compilation and custom platform-specific code where necessary).  There are multiple reasons for this workflow.  For one, our team’s core competency is on Windows.  Even our server programmers are ...

A Year of Conference Talks from the Microsoft C++ Team
Jan 25, 2021
Post comments count 2
Post likes count 0

A Year of Conference Talks from the Microsoft C++ Team

Sy Brand
Sy Brand

As we learned to adapt to virtual conferences last year we presented more than 20 talks on a wide range of topics. I've collected them all here so you can easily learn about the latest advances in our tooling as well as the cutting edge of C++ features. C++ Europe (February) WSLConf (March) Pure Virtual C++ (April) Microsoft Build (May) C++ on Sea (July) APAConf (August) CppCon (September) Meeting C++ (November) Let us know your thoughts We'd love to hear what you t...

Windows ARM64 support for CMake projects in Visual Studio
Jan 21, 2021
Post comments count 0
Post likes count 0

Windows ARM64 support for CMake projects in Visual Studio

Erika Sweet
Erika Sweet

In Visual Studio 2019 version 16.9 Preview 3 we added support for deploying CMake projects to a remote Windows machine and debugging them with the Visual Studio remote tools. CMake developers targeting ARM64 Windows can now cross-compile (with cl or clang-cl), deploy, and debug their projects directly from Visual Studio. You can download and install the latest preview of Visual Studio here. For step-by-step instructions of this workflow, check out the Tutorial: Debug a CMake project on a remote Windows machine. This tutorial is specific to ARM64 development, but the steps can be generalized for other Windows a...

MSVC Backend Updates in Visual Studio 2019 version 16.9 Preview 3
Jan 21, 2021
Post comments count 2
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 version 16.9 Preview 3

Helena Gregg
Helena Gregg

In Visual Studio 2019 version 16.9 Preview 3 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a brief list of improvements for you to review.  Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2019 and give it a try! Any feedback is welcome. We can be reached via the comments below, Developer Community, email ([email protected]), and Twitter (@VisualC).

Build Throughput Series: More Efficient Template Metaprogramming
Jan 19, 2021
Post comments count 0
Post likes count 0

Build Throughput Series: More Efficient Template Metaprogramming

Xiang Fan
Xiang Fan

In the previous blog post I shared how template specialization and template instantiation are processed in the MSVC compiler. We will now look at some examples from real-world code bases to show some ways to reduce the number of them. Example 1 This example is extracted from our own MSVC compiler code base. The code tries to apply several stateless functors on an object. Because the functors are stateless, they are represented by a list of types. Here is the code: Now let us see the initial implementation of . We extract the functors from and apply them one by one: To extract the functor from the list, w...

C++ with Visual Studio and WSL2
Jan 14, 2021
Post comments count 2
Post likes count 0

C++ with Visual Studio and WSL2

Erika Sweet
Erika Sweet

Our team released native support for C++ with the Windows Subsystem for Linux (WSL) in Visual Studio in 2019. “Native support” means that all commands are executed locally instead of over a SSH connection. Since then, WSL2 has been announced and we’ve received questions about our support for WSL2 in Visual Studio. The purpose of this blog post is to: Current support for WSL1 and WSL2 Our native support for WSL currently works best with WSL1. Our support executes all commands locally through wsl.exe and relies on Windows drives mounted under the /mnt folder (e.g. /mnt/c/Users…) to access local so...

Build Throughput Series: Template Metaprogramming Fundamentals
Jan 14, 2021
Post comments count 5
Post likes count 0

Build Throughput Series: Template Metaprogramming Fundamentals

Xiang Fan
Xiang Fan

Template metaprogramming is popular and seen in many code bases. However, it often contributes to long compile times. When investigating build throughput improvement opportunities in large codebases, our finding is that more than one million template specializations and template instantiations is quite common and often provides optimization opportunities for significant improvement. In this blog post, I will walk through the differences between template specialization and template instantiation and how they are processed in the MSVC compiler.  I will cover how to find these bottlenecks related to too many temp...

Faster C++ Iteration Builds
Jan 6, 2021
Post comments count 10
Post likes count 0

Faster C++ Iteration Builds

Russ Keldorph
Russ Keldorph

We made improvements to C++ link time earlier in Visual Studio 2019, and we have more improvements to tell you about. As of version 16.7, we measure up to 5X improvement in some incremental linking and debugging scenarios and up to a 1.5X speedup in full linking. These represent some of the improvements The Coalition saw in their recent experiment. Keep reading to find out the details. After the link time improvements in versions 16.0 and 16.2, we took a step back and re-evaluated the complete edit-build-debug (“inner loop”) experience of C++ developers. We were still looking at large projects like AAA games a...

Configure IntelliSense with CMake Toolchain Files in Visual Studio 2019 16.9 Preview 2
Dec 8, 2020
Post comments count 2
Post likes count 0

Configure IntelliSense with CMake Toolchain Files in Visual Studio 2019 16.9 Preview 2

Erika Sweet
Erika Sweet

Visual Studio can now configure IntelliSense in CMake projects based on the value of CMake variables set by CMake toolchain files. These improvements provide automatic IntelliSense configuration when a CMake toolchain file is used for configuration and build. For example, Visual Studio can now provide IntelliSense for CMake projects using an Android toolchain file. These changes will also improve IntelliSense for embedded developers using Visual Studio’s IoT (cross-compiler) configuration. More information on these changes is provided below. This support builds on Visual Studio’s native support for CMake and is a...

Visual Studio Code C++ Extension: ARM and ARM64 support
Dec 8, 2020
Post comments count 0
Post likes count 0

Visual Studio Code C++ Extension: ARM and ARM64 support

Julia Reid
Julia Reid

The latest release of the Visual Studio Code C++ extension brings C++ IntelliSense and build support for Windows ARM64, Linux ARM and Linux ARM64 architectures. What’s more, you can download VS Code builds for ARM and ARM64 architectures, meaning you can officially use VS Code and the C++ extension on a Raspberry Pi, Chromebook, Surface Pro X, and other ARM-based devices! To find out more about all the enhancements in the November 2020 update, check out our release notes on GitHub. Windows ARM64 support If you’re using a Surface Pro X, you now have access to the C++ extension’s rich feature set. This includes I...

Conditionally Trivial Special Member Functions
Nov 20, 2020
Post comments count 3
Post likes count 1

Conditionally Trivial Special Member Functions

Sy Brand
Sy Brand

The C++ standards committee is currently focusing on adding features to the language which can simplify code. One small example of this in C++20 is conditionally trivial special member functions, which we added support for in Visual Studio 2019 version 16.8. Its benefit isn’t immediately obvious unless you’ve been deep down the rabbit hole of high-performance library authoring, so I’ve written this post to show you how it can make certain generic types more efficient without requiring huge amounts of template magic. The Problem Types which wrap other types are common in the C++ world: pairs, tuples, optionals, ...

C++20 Features in Visual Studio 2019 versions 16.7 and 16.8
Nov 19, 2020
Post comments count 13
Post likes count 0

C++20 Features in Visual Studio 2019 versions 16.7 and 16.8

Daniel Griffing
Daniel Griffing

What’s New We have continued our efforts to implement C++20 in the MSVC toolset, with noteworthy progress being made in VS (Visual Studio) 2019 v16.7 and VS 2019 v16.8. This blog post lists the features implemented since the C++20 Features and Fixes in VS 2019 16.1 through 16.6 blog post. This blog post will specifically focus on language features implemented in the MSVC compiler (cl.exe). The changelog for conformance progress for the STL is tracked in the Standard Library changelog in the Microsoft STL GitHub repo. Some of the features covered were already highlighted in the announcements made at CppCon ...

The Coalition Sees 27.9X Iteration Build Improvement with Visual Studio 2019
Nov 16, 2020
Post comments count 4
Post likes count 0

The Coalition Sees 27.9X Iteration Build Improvement with Visual Studio 2019

David Li
David Li

Visual Studio 2019 v16.8 Preview 3.2 introduces significant build and link time improvements. In this blog post, we detail how the team in The Coalition building Gears 5 tested the compile and link times in three different versions of Visual Studio.

A Tour of C++ Modules in Visual Studio
Oct 29, 2020
Post comments count 30
Post likes count 0

A Tour of C++ Modules in Visual Studio

Will Buik
Will Buik

C++ module support has arrived in Visual Studio! Grab the latest Visual Studio Preview if you want to try it out. C++ modules can help you compartmentalize your code, speed up build times, and they work seamlessly, side-by-side with your existing code. This preview only supports C++ modules in the IDE for MSBuild projects. While the MSVC toolset is supported by any build system, Visual Studio’s IDE support for CMake doesn’t support C++ modules yet. We will let you know once it is! As always, please try it out and let us know if you have any feedback. Module Basics C++ modules allow you to closely control wha...

Even More New Safety Rules in C++ Code Analysis
Oct 28, 2020
Post comments count 4
Post likes count 0

Even More New Safety Rules in C++ Code Analysis

Hwi-sung Im
Hwi-sung Im

In Visual Studio version 16.8 Preview 3,  we have added a few safety rules to C++ Code Analysis that can find some common mistakes, which can lead to bugs ranging from simple broken features to costly security vulnerabilities. These new rules are developed around issues discovered in production software via security reviews and incidents requiring costly servicing. Every shipping piece of software in Microsoft runs these rules as part of security and compliance requirements.  The first part of this blog series, New Safety Rules in C++ Code Analysis, introduced new rules related to the misuse of  and its siblin...

Typelib and ActiveX now supported in MFC Wizards 
Oct 23, 2020
Post comments count 14
Post likes count 0

Typelib and ActiveX now supported in MFC Wizards 

Anju Del Moral Gonzalez
Anju Del Moral Gonzalez

We are happy to announce that the Typelib and ActiveX Wizards are now available in Visual Studio 2019.   We’ve been working on rewriting all the wizards in Visual Studio to make them more accessible. These two wizards were not initially part of our rewriting plans and they were marked as deprecated in Visual Studio 2017 and missing in Visual Studio 2019. During this time, we listened to your feedback in an ongoing survey linked from the deprecation message. We want to thank everyone that took the time to share with us the types of projects they're working on and what role these wizards have in their workfl...

C++20 STL Features: 1 Year of Development on GitHub
Oct 14, 2020
Post comments count 14
Post likes count 0

C++20 STL Features: 1 Year of Development on GitHub

Stephan T. Lavavej - MSFT
Stephan T. Lavavej - MSFT

My CppCon 2020 talk, “C++20 STL Features: 1 Year of Development on GitHub”, is now available on YouTube. The slides are available on GitHub as PDF and original PPTX. The talk contains complete examples (not snippets!) of several C++20 features: integer comparison functions, constexpr algorithms, uniform container erasure, atomic_ref, and span. Here are the important links from the end of the talk: Finally, at the end of the talk I had time to answer a half-dozen questions, but there were many more. Here are those extra questions and my answers:   Q: Why do you squash pull reque...

Introducing the new Azure SDK for C++ Beta
Oct 13, 2020
Post comments count 2
Post likes count 0

Introducing the new Azure SDK for C++ Beta

Billy O'Neal
Billy O'Neal

The Azure SDK team is pleased to announce their first beta release of the new Azure SDK for C++. Unlike the previous Azure Storage specific SDK, the new Azure SDK for C++ is idiomatic to the C++ language and ensures consistency in behavior and API surface when communicating with multiple Azure services. This initial beta supports Azure Blob Storage, File Shares, and Data Lake; support for Azure KeyVault Keys is coming soon. The Azure SDK for C++: Please read the "Introducing the new Azure SDK for C++" blog post for more information.

Faster C++ builds, simplified: a new metric for time
Oct 12, 2020
Post comments count 18
Post likes count 0

Faster C++ builds, simplified: a new metric for time

Kevin Cadieux
Kevin Cadieux

C++ Build Insights is a collection of tools and APIs that can help you gain a deeper understanding of your build times. Today, we’d like to teach you about a special metric offered in this toolkit: the wall clock time responsibility (WCTR). It can be used to estimate how much time is really spent by each activity in your build, even in the presence of parallelism. We first describe how to access this metric with vcperf. Then, we delve into a real-world case study of using the metric to guide the creation of a pre-compiled header (PCH) for the CopperSpice open source project. We hope you will find uses for WCTR in...

Build and debug Qt projects on Linux with Qt Visual Studio Tools
Oct 6, 2020
Post comments count 1
Post likes count 0

Build and debug Qt projects on Linux with Qt Visual Studio Tools

Erika Sweet
Erika Sweet

Qt is a popular cross-platform framework for application development and user interface design. Its various libraries and toolsets can be used to create, test, and deploy applications that target multiple platforms and operating systems including Linux, Windows, macOS and embedded/microcontroller systems. Qt recently released a new version of the Qt Visual Studio Tools extension that integrates with Visual Studio’s Linux development with C++ workload. This extension allows you to build and debug MSBuild-based Qt projects on both Windows and Linux directly from Visual Studio. To illustrate this integration, Qt ...

C++ Core Check in Visual Studio
Oct 6, 2020
Post comments count 3
Post likes count 0

C++ Core Check in Visual Studio

Jordan Maples
Jordan Maples

C++ Core Check is Microsoft’s static analysis tool that enforces the rules from the C++ Core Guidelines, which is maintained by the C++ Foundation. This post is to provide a snapshot of the C++ Core Guidelines coverage that C++ Core Check offers. For background, the C++ team introduced C++ Core Check in December 2015 as part of Visual Studio 2015 Update 1. At the time of its release, C++ Core Check offered rules from the Bounds profile and Type profile with the promise of the Lifetimes profile to follow. The C++ team has been expanding C++ Core Check's coverage over the last five years. We have added more r...

New Safety Rules in C++ Code Analysis
Oct 2, 2020
Post comments count 13
Post likes count 0

New Safety Rules in C++ Code Analysis

Hwi-sung Im
Hwi-sung Im

In Visual Studio version 16.8 Preview 3,  we are adding a few safety rules to C++ Code Analysis that can find some common mistakes, which can lead to bugs ranging from simple broken features to costly security vulnerabilities. These new rules are developed around issues discovered in production software via security reviews and incidents requiring costly servicing. Every shipping piece of software in Microsoft runs these rules as part of security and compliance requirements. This blog post will introduce new rules related to and its sibling types – such as , or . To help with the new rules, we have built a cod...

Welcome C++ developers to GitHub Codespaces! 
Sep 22, 2020
Post comments count 4
Post likes count 0

Welcome C++ developers to GitHub Codespaces! 

Nick Uhlenhuth
Nick Uhlenhuth

In May we announced Visual Studio Codespaces and its early support for C++ developers. Over the last several months we interviewed early adopters, and based on their feedback we continued to add new functionality and to improve the Codespaces experience. As part of these efforts, we are excited to announce that we’ve streamlined the experience and now Visual Studio Codespaces has consolidated into GitHub Codespaces. This shift means Visual Studio developers and VS Code developers will have a single service and experience when connecting to a Codespace. At Ignite we’ve provided some further updates to Codes...

Happy 20th Birthday CMake!
Sep 16, 2020
Post comments count 5
Post likes count 0

Happy 20th Birthday CMake!

Marian Luparu
Marian Luparu

CMake is now 20! Kitware posted yesterday an interview with Bill Hoffman, the original creator for CMake and shared that August 31 was CMake's 20th birthday Here, in the C++ team, we are not only heavy CMake users. We also believe that CMake is a foundational piece for all C++ cross-platform developers and, as such, we strive to enable the best CMake experiences in both Visual Studio and Visual Studio Code. A lot of the work we do in Visual Studio and Visual Studio Code wouldn't be possible without the hard work on CMake toolability from the folks over at Kitware. So if you use these capabilities, join us i...

Project OneFuzz: new open source developer tool to find and fix bugs at scale
Sep 15, 2020
Post comments count 2
Post likes count 0

Project OneFuzz: new open source developer tool to find and fix bugs at scale

Marian Luparu
Marian Luparu

We're excited to echo Microsoft Security team's announcement that Project OneFuzz is now available as an open-source project in GitHub. To learn more about the announcement, head over to our Microsoft Security blog to read "Microsoft announces new Project OneFuzz framework, an open source developer tool to find and fix bugs at scale". From the announcement: "Microsoft’s goal of enabling developers to easily and continuously fuzz test their code prior to release is core to our mission of empowerment. The global release of Project OneFuzz is intended to help harden the platforms and tools that power our daily w...

C++ in Visual Studio Code reaches version 1.0!
Sep 14, 2020
Post comments count 6
Post likes count 0

C++ in Visual Studio Code reaches version 1.0!

Julia Reid
Julia Reid

We’re excited to announce the first generally available release of the C++ extension for Visual Studio Code! Visual Studio Code is a free code editor that runs on Linux, macOS, and Windows, and is highly-customizable to make it exactly what you want it to be. The C++ extension brings a rich set of productivity features to VS Code for C++ developers, including IntelliSense smart code completion, debugging, refactoring, code navigation, and more! On top of that, these features are adaptable to various platforms, architectures and compilers, enabling all your cross-compiling and remote development scenarios. T...

A Multitude of Updates in Visual Studio 2019 version 16.8 Preview 3
Sep 14, 2020
Post comments count 15
Post likes count 0

A Multitude of Updates in Visual Studio 2019 version 16.8 Preview 3

Sy Brand
Sy Brand

Visual Studio 2019 version 16.8 Preview 3 comes with a huge collection of updates for C++ programmers. Download today to try out new additions in conformance, performance, and productivity. C++20 We’ve improved support for major C++20 features across our compiler, standard library, and IDE. You can now use Modules, Concepts, Coroutines, and (some of) Ranges all in the same project! C++20 Coroutines are now feature-complete and available under /std:c++latest. When using C++20 Coroutines you should include the <coroutine> header. Support for our legacy behaviour is available under <experimental/corout...

Debug Linux core dumps in Visual Studio
Sep 14, 2020
Post comments count 3
Post likes count 0

Debug Linux core dumps in Visual Studio

Erika Sweet
Erika Sweet

In Visual Studio 2019 version 16.8 Preview 3 we added the ability to debug Linux core dumps on the Windows Subsystem for Linux (WSL) or a remote Linux system directly from Visual Studio. This support is specific to the “Native Only" debugger type for unmanaged C++ code.  We understand that some teams develop on Windows but deploy to both Windows and Linux (or just Linux!) and rely on a CI system to catch Linux-specific errors. This feature will make your life easier if you run a Windows shop but deploy to Linux servers and want to debug crashes in a familiar environment. To get started, select Debug > Ot...

C++ Coroutines in Visual Studio 2019 Version 16.8
Sep 14, 2020
Post comments count 4
Post likes count 1

C++ Coroutines in Visual Studio 2019 Version 16.8

Jonathan Emmett
Jonathan Emmett

Please see our Visual Studio 2019 version 16.8 Preview 3 release notes for more of our latest features. It's been a long journey for coroutines in C++ and in MSVC. We announced an early preview of resumable functions in 2013, followed up by the switch and initial C++ standardization proposals in 2014, to proposal revisions in 2015, and have continued tracking the Coroutines TS (Technical Specification) progress through Visual Studio 2017 and 2019. With the adoption of coroutines into the C++ standard in 2019, we are now pleased to announce feature completion of C++20 coroutines in Visual Studio 2019 version 1...

Standard C++20 Modules support with MSVC in Visual Studio 2019 version 16.8
Sep 14, 2020
Post comments count 37
Post likes count 0

Standard C++20 Modules support with MSVC in Visual Studio 2019 version 16.8

Cameron DaCamara
Cameron DaCamara

Please see our Visual Studio 2019 version 16.8 Preview 3 release notes for more of our latest features. It has been some time since our last update regarding C++ Modules conformance. The toolset, project system, and IDE teams have been hard at work to create a first class C++ Modules experience in Visual Studio 2019. There is a lot to share, so let's get right into it: What's new? Implies C++ Modules Since MSVC began down the path of implementing the Modules TS the toolset has always required the use of on any compilation. Since the merge of Modules into the C++20 standard (we ...

C11 and C17 Standard Support Arriving in MSVC
Sep 14, 2020
Post comments count 15
Post likes count 0

C11 and C17 Standard Support Arriving in MSVC

Elnar Dakeshov
Elnar Dakeshov

Please see our Visual Studio 2019 version 16.8 Preview 3 release notes for more of our latest features. Update: Windows 10 SDK version 2104 has been released, which includes the changes needed for C11 and C17 as well as the conformant preprocessor. It can be downloaded here. To use this SDK, follow the instructions from step 3. Our team is happy to announce that C11 and C17 are becoming supported language versions in the MSVC compiler toolset starting with Visual Studio 2019 version 16.8 Preview 3! For many years Visual Studio has only supported C to the extent of it being required for C++. Things are ab...

vcpkg: Accelerate your team development environment with binary caching and manifests
Sep 14, 2020
Post comments count 4
Post likes count 0

vcpkg: Accelerate your team development environment with binary caching and manifests

Augustin Popa
Augustin Popa

 This post was updated on September 21, 2020 to add more information on the GitHub Packages binary caching example.  Please see our Visual Studio 2019 version 16.8 Preview 3 release notes for more of our latest features. September is the biggest month for us in the Microsoft C++ team as it’s CppCon month! Our team has many exciting announcements for you this week, including a significant update to the vcpkg library manager for C/C++. We are excited to announce support for vcpkg binary caching and manifest files. These are key features that have been requested by our users from the beginning, and are intended ...

Microsoft C++ Team at CppCon 2020
Sep 10, 2020
Post comments count 0
Post likes count 0

Microsoft C++ Team at CppCon 2020

Will Buik
Will Buik

The Microsoft C++ team has an exciting lineup of sessions at CppCon 2020. Many of us will also be present at our team’s booth in the virtual exhibition hall throughout the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! We’ll be making a few exciting announcements about Visual Studio and Visual Studio Code. We’re also running a survey on the C++ ecosystem and giving away five copies of Microsoft Flight Simulator 2020 (one each day of the conference) to survey participants. If you have a moment, please take our survey, it's quick. Here’s the ...

New safety rules in C++ Core Check
Sep 4, 2020
Post comments count 6
Post likes count 0

New safety rules in C++ Core Check

Sunny Chatterjee
Sunny Chatterjee

Rust and C++ are two popular systems programming languages. For years, the focus of C++ has been on performance. We are increasingly hearing calls from customers and security researchers that C++ should have stronger safety guarantees in the language. C++ often falls behind Rust when it comes to programming safety. Visual Studio 2019 version 16.7 contains four new rules in C++ Core Check to incorporate some safety features from Rust into C++.   For more detailed information on C++ Core Check, please see the C++ Core Guidelines Checker Reference documentation. If you’re just getting started with native code ana...

<bit> in Visual Studio 2019 version 16.8 Preview 2
Sep 3, 2020
Post comments count 0
Post likes count 0

<bit> in Visual Studio 2019 version 16.8 Preview 2

Charlie Barto
Charlie Barto

Bit twiddling: “bit rotating and counting functions” and “integral power of two operations”.

Introducing vcperf /timetrace for C++ build time analysis
Aug 27, 2020
Post comments count 4
Post likes count 0

Introducing vcperf /timetrace for C++ build time analysis

Kevin Cadieux
Kevin Cadieux

The following blog post was written by guest author Carlos Fraguas from Mercury Steam Entertainment. He describes how he used the C++ Build Insights SDK to add the new /timetrace option in vcperf, and how he also used it to build custom tools tailored to his team's needs. You can follow Carlos on Twitter using handle @MetanoKid. Hello! I’m Carlos Fraguas and I work as a Gameplay Programmer at Mercury Steam Entertainment. Let’s look at how the C++ Build Insights SDK helped me create tools to decrease build times and how I ended up adding a new visualization option into vcperf. Background There’s one t...

Introducing source dependency reporting with MSVC in Visual Studio 2019 version 16.7
Aug 13, 2020
Post comments count 11
Post likes count 0

Introducing source dependency reporting with MSVC in Visual Studio 2019 version 16.7

Cameron DaCamara
Cameron DaCamara

C++20 demands a lot more from the ecosystem than ever before. With C++20 Modules on the horizon the compiler needs to work closely with project systems in order to provide rich information for build dependency gathering and making iterative builds faster for inner-loop development. The compiler and project teams have acknowledged the new relationship and collaborated together to bring a new switch to the compiler toolset which can provide useful information to the build system: . Source Dependency Reporting The new switch for the compiler toolset enables the compiler to generate a source-level dependency report...

AddressSanitizer for Windows: x64 and Debug Build Support
Aug 11, 2020
Post comments count 23
Post likes count 0

AddressSanitizer for Windows: x64 and Debug Build Support

Augustin Popa
Augustin Popa

⌚ This post was last updated on March 24, 2021 with up-to-date information as of the 16.9 release of Visual Studio.  Special thanks to Jim Radigan and Matthew McGovern for providing the content for this blog post. Note: This feature is now generally available. To get started, take a look at the official AddressSanitizer for Windows with MSVC documentation.   Last October, we announced AddressSanitizer support for Windows as part of the x86 retail MSVC toolset. This included an IDE experience in Visual Studio with AddressSanitizer error reporting, visualized in dialog boxes anchored to the source ...

Sign Up for the Private Preview of Visual Studio support for Codespaces!
Aug 3, 2020
Post comments count 0
Post likes count 0

Sign Up for the Private Preview of Visual Studio support for Codespaces!

Nick Uhlenhuth
Nick Uhlenhuth

At the Microsoft Build conference, you may have seen our C++ Codespaces demo (at 26:00). We showed several ways Codespaces can improve your C++ development experience, including offloading your builds and other compute-heavy tasks to the cloud. We’ve already been chatting with many you, and now we are ready to allow more people into the Private Preview. Currently, our support is focused on C++ console applications and library development, so if that sounds like you, sign up for the Private Preview (and make sure to indicate “C++” as your Preferred Dev Language). What is Codespaces? Codespaces are cloud-powe...

Improving code generation time with C++ Build Insights
Jul 21, 2020
Post comments count 0
Post likes count 0

Improving code generation time with C++ Build Insights

Kevin Cadieux
Kevin Cadieux

Code generation time is a significant contributor to total build time for optimized builds. During this step of the compilation process, source code is passed through several algorithms that transform your program into an optimized version that can be executed more efficiently. In general, the optimization of a C++ function happens quickly and poses no problem. In exceptional cases, however, some functions can become large and complex enough to put pressure on the optimizer and noticeably slow down your builds. In this article, we show how you can use C++ Build Insights to determine if slow code generation is a p...

Visual Studio Code C++ Extension July 2020 Update: Doxygen comments and Logpoints
Jul 20, 2020
Post comments count 4
Post likes count 1

Visual Studio Code C++ Extension July 2020 Update: Doxygen comments and Logpoints

Julia Reid
Julia Reid

The July 2020 update of the Visual Studio Code C++ extension is now available. This latest release offers brand new features, such as the visualization of Doxygen comments and support for Logpoints while debugging (GDB/LLDB), along with a bunch of enhancements and bug fixes. To find out more about all the changes, check out our release notes on GitHub. Displaying Doxygen Comments Doxygen is a programming tool that generates documentation for source code. You can annotate your code with comments that contain helpful tips about functions, then Doxygen will generate documentation from these comments. With the J...

Initial Support For C++20 Ranges 
Jul 15, 2020
Post comments count 1
Post likes count 0

Initial Support For C++20 Ranges 

Casey Carter
Casey Carter

We are happy to announce that Visual Studio 2019 version 16.6 contains the first user-visible pieces of C++20 Ranges support. We’ve been working on support machinery for a few releases now, but in this release the tip of the iceberg has finally broken the surface of the water and there are now some tools available for users. The Ranges implementation critically depends on C++ Concepts, and as such is usable with both MSVC and Clang in their C++20 Preview modes but not yet well-supported by IntelliSense. (Don’t worry, we’ll have proper IntelliSense support soon.)  What’s Available?  ...

C++ Linux development with Visual Studio: incremental build improvements and expanded shell support
Jul 8, 2020
Post comments count 11
Post likes count 0

C++ Linux development with Visual Studio: incremental build improvements and expanded shell support

Erika Sweet
Erika Sweet

Visual Studio 2019 allows C++ developers to target both Windows and Linux (including the Windows Subsystem for Linux) from the comfort of a single IDE. Visual Studio 2019 version 16.7 Preview 3 introduces two features specific to Linux development: improved build incrementality for MSBuild-based Linux projects, and support for a wider range of Linux distributions and shells. There are two ways C++ developers can target Linux systems from Visual Studio. Our recommendation for anything cross-platform or with an eye to open-sourcing is our native support for CMake. This allows you to leverage the same source code...

C++20 Features and Fixes in VS 2019 16.1 through 16.6
Jul 2, 2020
Post comments count 16
Post likes count 0

C++20 Features and Fixes in VS 2019 16.1 through 16.6

Stephan T. Lavavej - MSFT
Stephan T. Lavavej - MSFT

What's New We've been busy implementing C++20 features in MSVC's compiler and Standard Library, and migrating the latter to microsoft/STL on GitHub - in fact, we've been so busy that we haven't posted a C++ toolset changelog since the VS 2019 16.0 toolset changelog. So, here are the compiler features and STL features/fixes that have shipped for production use in the last year. As a reminder, the /std:c++17 and /std:c++latest compiler options are necessary to use C++17 and C++20 features.   VS 2019 16.1 New features (all thanks to our intern Paolo Torres):   New l...

Linux development with Visual Studio: first-class support for gdbserver, improved build times with Ninja, and updates to the Connection Manager
Jun 2, 2020
Post comments count 7
Post likes count 0

Linux development with Visual Studio: first-class support for gdbserver, improved build times with Ninja, and updates to the Connection Manager

Erika Sweet
Erika Sweet

With Visual Studio 2019 you can build and debug C++ projects on a remote Linux system or the Windows Subsystem for Linux (WSL). You can get started with Linux development in Visual Studio using MSBuild-based Linux projects or our native support for CMake. CMake lets you use the same source code and build scripts to target multiple platforms and is our recommendation for anything cross-platform or with an eye to open-sourcing. This blog post covers recent improvements to our Linux support in Visual Studio, including: More details on all these new features are listed below. Improved build times wi...

Profiling template metaprograms with C++ Build Insights
May 28, 2020
Post comments count 2
Post likes count 0

Profiling template metaprograms with C++ Build Insights

Kevin Cadieux
Kevin Cadieux

The use of templates in C++ programs can sometimes lead to longer builds. C++ Build Insights puts tools at your disposal for analyzing template usage patterns and their associated impact on build time. In this article, we show you how to use the vcperf analysis tool and the C++ Build Insights SDK to understand and fix problematic template patterns. We demonstrate the practical use of these tools through a case study in which we reduced build time for the Sprout open-source metaprogramming library by 25%. We hope these methods will help you approach your template endeavors with confidence! How to obtain and use...

Join us this week at Microsoft Build digital event
May 18, 2020
Post comments count 0
Post likes count 0

Join us this week at Microsoft Build digital event

Marian Luparu
Marian Luparu

We are looking forward to this week's main event, Microsoft Build 2020. Build 2020 starts tomorrow Tuesday, May 19 and will run for 48 continuous hours as a digital-only event that is open to anyway around the world, at no cost. This is the first major tech conference to go full-digital with an experience designed from the ground-up for a virtual audience. The C++ team is excited to be a part of this event and we'd like to invite you all to join us. At Build, we will demo the new capabilities our team has been working on recently. Our partner teams at Microsoft will also showcase new services and tools that yo...

Visual Studio Code C++ extension: May 2020 update
May 14, 2020
Post comments count 5
Post likes count 0

Visual Studio Code C++ extension: May 2020 update

Julia Reid
Julia Reid

The May 2020 update of the Visual Studio Code C++ extension is now available. This latest release offers brand new features—ARM and ARM64 IntelliSense modes and C++ language-specific code folding—along with a bunch of enhancements and bug fixes. To find out more about all the changes, check out our release notes on GitHub. ARM and ARM64 IntelliSense modes With the May 2020 update, you can configure the C++ extension to provide proper IntelliSense when cross-compiling for ARM and ARM64. This means you're compiling for a different architecture than your host development machine. All you need to do is set your com...

Faster builds with PCH suggestions from C++ Build Insights
May 8, 2020
Post comments count 14
Post likes count 0

Faster builds with PCH suggestions from C++ Build Insights

Kevin Cadieux
Kevin Cadieux

The creation of a precompiled header (PCH) is a proven strategy for improving build times. A PCH eliminates the need to repeatedly parse a frequently included header by processing it only once at the beginning of a build. The selection of headers to precompile has traditionally been viewed as a guessing game, but not anymore! In this article, we will show you how to use the vcperf analysis tool and the C++ Build Insights SDK to pinpoint the headers you should precompile for your project. We’ll walk you through building a PCH for the open source Irrlicht project, yielding a 40% build time improvement. How to ob...

Pure Virtual C++ Conference 2020 Videos and Survey Available
May 6, 2020
Post comments count 0
Post likes count 0

Pure Virtual C++ Conference 2020 Videos and Survey Available

Sy Brand
Sy Brand

The videos of all Pure Virtual C++ 2020 sessions are now available on YouTube. If you attended the conference, we'd love to hear your feedback. Please fill in our survey so we know what to improve if we run another similar event in the future!

Vcpkg 2020.04 Update and Product Roadmap
May 1, 2020
Post comments count 6
Post likes count 0

Vcpkg 2020.04 Update and Product Roadmap

Augustin Popa
Augustin Popa

This is the April 2020 blog post on vcpkg, the cross-platform, open source C/C++ library manager. In this post, we will share some information on the 2020.04 release of vcpkg and discuss the vcpkg product roadmap, which we are publishing and will keep up to date over time. To try out vcpkg for yourself and save yourself some time acquiring your project dependencies, follow the instructions on our GitHub repository.   March Vcpkg Activity We want to start by thanking our contributors to the vcpkg project on GitHub. The following people contributed PRs that were merged to the master branch in March, not i...

Finding build bottlenecks with C++ Build Insights
Apr 22, 2020
Post comments count 23
Post likes count 0

Finding build bottlenecks with C++ Build Insights

Kevin Cadieux
Kevin Cadieux

C++ Build Insights offers more than one way to investigate your C++ build times. In this article, we discuss two methods that you can use to identify bottlenecks in your builds: manually by using the vcperf analysis tool, or programmatically with the C++ Build Insights SDK. We present a case study that shows how to use these tools to speed up the Git for Windows open source project. We hope these tutorials will come in handy when analyzing your own builds. How to obtain and use vcperf The examples in this article make use of vcperf, a tool that allows you to capture a trace of your build and to view it in t...

Sign Up For Pure Virtual C++ Conference 2020
Apr 16, 2020
Post comments count 0
Post likes count 0

Sign Up For Pure Virtual C++ Conference 2020

Sy Brand
Sy Brand

Pure Virtual C++ 2020 is a free single-track one-day virtual conference for the whole C++ community. It is taking place on Thursday 30th April 2020 from 14:30 to 23:00 UTC. Sign up on the event website. All talks will be pre-recorded and streamed on YouTube Live with a live Q&A session with the speakers. After the event, the talks will be available to watch online for free. The Pure Virtual C++ conference organized by Microsoft will be run under the Berlin Code of Conduct. The preliminary schedule is (all times UTC): Get involved in the conversation on Twitter usi...

GSL 3.0.0 Release
Apr 16, 2020
Post comments count 2
Post likes count 0

GSL 3.0.0 Release

Jordan Maples
Jordan Maples

Update June 4th, 2020 - GSL version 3.1.0 has been released. Please see the latest release page for information regarding GSL 3.1.0. For all future updates, please see refer to the release page on GitHub.   GSL 3.0.0 Release Version 3.0.0 of Microsoft's implementation of the C++ Core Guidelines Support Library (GSL) is now available for you to download on the releases page. Microsoft’s implementation of has played a pivotal role in the standardization of span for C++20. However, the standard does not provide any runtime checking guarantees for memory bounds safety. The bounds safety provided by has b...

MSVC Backend Updates in Visual Studio 2019 Version 16.5
Apr 8, 2020
Post comments count 1
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 Version 16.5

Mei Xu
Mei Xu

In Visual Studio 2019 version 16.5 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a brief list of improvements for you to review. For additional optimizations implemented in MSVC in previous releases, check out our MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4 Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2019 and give it a try! Any feedback is welcome. We can be reached via the...

New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019
Apr 3, 2020
Post comments count 3
Post likes count 0

New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019

Erika Sweet
Erika Sweet

We heard your feedback that it can be difficult to configure debugging sessions on remote Linux systems or the Windows Subsystem for Linux (WSL). In Visual Studio 2019 version 16.6 Preview 2 we introduced a new debugging template to simplify debugging with gdb. The new cppgdb template We heard your feedback that the old debug configurations were too verbose, too confusing, and not well documented. The new cppgdb configuration has been simplified and looks like this: The new setting debuggerConfiguration indicates which set of debugging default values to use. In Visual Studio 2019 version ...

Porting a C++/CLI Project to .NET Core
Mar 30, 2020
Post comments count 11
Post likes count 0

Porting a C++/CLI Project to .NET Core

Mike Rousos
Mike Rousos

One of the new features of Visual Studio 2019 (beginning with version 16.4) and .NET Core 3.1 is the ability to build C++/CLI projects targeting .NET Core. This can be done either directly with cl.exe and link.exe (using the new option) or via MSBuild (using ). In this post, I'll walk through the steps necessary to migrate a simple C++/CLI interop project to .NET Core. More details can be found in .NET Core documentation. The sample project First, I need to make a sample solution to migrate. I'm going to use an app with a native entry point that displays a Windows Forms form via C++/CLI. Migrating a solution w...

Announcing full support for a C/C++ conformant preprocessor in MSVC
Mar 27, 2020
Post comments count 20
Post likes count 0

Announcing full support for a C/C++ conformant preprocessor in MSVC

Elnar Dakeshov
Elnar Dakeshov

Update June 8, 2021: The C11 and C17 announcement post has instructions on how to get the latest Windows SDK that works with the conformant preprocessor. We are excited to announce full support for a conformant preprocessor in the MSVC toolset starting with Visual Studio 2019 version 16.6 Preview 2. Since the original blog post announcing preprocessor conformance changes, we’ve come a long way and are now ready to announce the completion of the C/C++ conformant preprocessor and its move to a non-experimental, fully supported state via the switch. Alongside standard conformance, the preprocessor also suppor...

Doxygen and XML Doc Comment support
Mar 26, 2020
Post comments count 12
Post likes count 1

Doxygen and XML Doc Comment support

Nick Uhlenhuth
Nick Uhlenhuth

Whether you’re using Doxygen or XML Doc Comments, Visual Studio version 16.6 Preview 2 provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support. Stub Generation By default, the stub generation is set to XML Doc Comments. The comment stub can be generated by typing a triple slash (///) or by using the documentation generation shortcut (Ctrl+/) above the function. XML Doc Comment Doxygen To switch to Doxygen, type “Doxygen” in the Ctrl+Q search box, or go to Tools > Options > Text Editor > C/C++ > > General, and choose your preferred doc...

IntelliSense Code Linter for C++
Mar 26, 2020
Post comments count 7
Post likes count 0

IntelliSense Code Linter for C++

Kyle Reed
Kyle Reed

Introducing the IntelliSense Code Linter for C++; a preview of "as-you-type" code analysis with fixups. Try it out today in Visual Studio 2019 16.6 Preview 2.

More Spectre Mitigations in MSVC
Mar 13, 2020
Post comments count 2
Post likes count 0

More Spectre Mitigations in MSVC

Daniel Donenfeld
Daniel Donenfeld

In a previous blog post, Microsoft described the Spectre mitigations available under . These mitigations, while not significantly impacting performance, do not protect against all possible speculative load attacks, described in industry research as Load Value Injection. We are now adding two new switches and to provide a more complete mitigation of Spectre attacks based on loads for customers. These switches are only available on x86 and x64 platforms. What do the new switches do? The flag specifies compiler generation of serializing instructions for every load instruction. For most loads, this entails addin...

Analyze your builds programmatically with the C++ Build Insights SDK
Mar 6, 2020
Post comments count 5
Post likes count 0

Analyze your builds programmatically with the C++ Build Insights SDK

Kevin Cadieux
Kevin Cadieux

We're happy to announce today the release of the C++ Build Insights SDK, a framework that gives you access to MSVC build time information via C and C++ APIs. To accompany this release, we are making vcperf open source on GitHub. Because vcperf itself is built with the SDK, you can use it as a reference when developing your own tools. We’re excited to see what sort of applications you’ll be building with the SDK, and we’re looking forward to receiving your feedback! Background Last November, we introduced vcperf and its Windows Performance Analyzer (WPA) plugin to help MSVC users understand their build times...

The Performance Benefits of Final Classes
Mar 2, 2020
Post comments count 8
Post likes count 2

The Performance Benefits of Final Classes

Sy Brand
Sy Brand

The specifier in C++ marks a class or virtual member function as one which cannot be derived from or overriden. For example, consider the following code:  If we attempt to write a new class which derives from `derived` then we get a compiler error:  The specifier is useful for expressing to readers of the code that a class is not to be derived from and having the compiler enforce this, but it can also improve performance through aiding devirtualization.  Devirtualization  Virtual functions require an indirect call through the vtable, which is more expensive than a direct call due to interactions with b...

AVX2 floating point improvements in Visual Studio 2019 version 16.5
Feb 28, 2020
Post comments count 2
Post likes count 0

AVX2 floating point improvements in Visual Studio 2019 version 16.5

Bran Hagger
Bran Hagger

Visual Studio version 16.2 provided a number of improvements to C++ video game development through vector optimizations. Visual Studio version 16.5 builds on these changes to improve the performance of even more vector operations.

AVX-512 Auto-Vectorization in MSVC
Feb 27, 2020
Post comments count 8
Post likes count 0

AVX-512 Auto-Vectorization in MSVC

Rui Zhang
Rui Zhang

In Visual Studio 2019 version 16.3 we added AVX-512 support to the auto-vectorizer of the MSVC compiler. This post will show some examples and help you enable it in your projects. What is the auto vectorizer? The compiler’s auto vectorizer analyzes loops in the user’s source code and generates vectorized code for a vectorization target where feasible and beneficial. For example, if I build the code above using cl.exe /O2 /fp:fast /arch:AVX2 targeting AVX2, I get the following assembly. The lines 11-15 are the vectorized loop using ymm registers. The lines 16-21 are to calculate the scalar value sum from vect...

Custom AI-Assisted IntelliSense for your team
Feb 21, 2020
Post comments count 0
Post likes count 0

Custom AI-Assisted IntelliSense for your team

Nick Uhlenhuth
Nick Uhlenhuth

As you’ve been editing code, you may have noticed IntelliCode’s starred recommendations in your autocompletion lists. Our previous IntelliCode blog post explains that these smarter suggestions were machine-learned over thousands of open sourced GitHub repos. Using community knowledge is great for public APIs like the Standard Library, but what if you want IntelliCode suggestions for your APIs and other libraries that wouldn’t commonly be found in open-source code? To address this, in Visual Studio 2019 version 16.5 Preview 3 you can now train custom IntelliCode models on your own codebases. This generates somethi...

Qt to support Visual Studio Linux projects
Feb 20, 2020
Post comments count 2
Post likes count 0

Qt to support Visual Studio Linux projects

Erika Sweet
Erika Sweet

Qt is a popular cross-platform framework for application development and user interface design. Its various libraries and toolsets can be used to create, test, and deploy applications that target multiple platforms and operating systems including Linux, Windows, macOS and embedded/microcontroller systems. Qt recently announced its plan to support Visual Studio Linux projects in an upcoming release of the Qt Visual Studio Tools extension, scheduled for this summer. “Since the introduction of the C++ Linux workload, users have had the possibility of working on Linux development in Visual Studio.  This featur...

Visual Studio Code CMake Tools Extension: Multi-root workspaces and file-based API
Feb 7, 2020
Post comments count 0
Post likes count 2

Visual Studio Code CMake Tools Extension: Multi-root workspaces and file-based API

Erika Sweet
Erika Sweet

The February 2020 update of the Visual Studio Code CMake Tools extension is now available. This release includes two of the extension’s top feature requests: file-based API support and multi-root workspaces. For a full list of this release’s improvements check out the release notes on GitHub. Multi-root workspace support The latest release of the CMake Tools extension comes with support for multi-root workspaces. This means you can have two or more folders containing a root CMakeLists.txt open side-by-side in Visual Studio Code. When a workspace contains multiple folders, the CMake Tools extension will display ...

Easily Add, Remove, and Rename Files and Targets in CMake Projects
Feb 6, 2020
Post comments count 9
Post likes count 1

Easily Add, Remove, and Rename Files and Targets in CMake Projects

Will Buik
Will Buik

It’s easier than ever to work with CMake projects in Visual Studio 2019 16.5 Preview 2. Now you can add, remove, and rename source files and targets in your CMake projects from the IDE without manually editing your CMake scripts. When you add or remove files with the Solution Explorer, Visual Studio will automatically edit your CMake project. You can also add, remove, and rename the project’s targets from the Solution Explorer’s targets view. C and C++ Source Files Visual Studio now tracks C and C++ source files as they are added, renamed, or removed from the Solution Explorer, automatically modifying the u...

Code Navigation for CMake Scripts
Feb 6, 2020
Post comments count 1
Post likes count 1

Code Navigation for CMake Scripts

Will Buik
Will Buik

Visual Studio 2019 16.5 Preview 2 makes it easy to make sense of complex CMake projects. Code navigation features such as Go To Definition and Find All References are now supported for variables, functions, and targets in CMake script files. This can be a huge timesaver because CMake projects with more than a handful of source files are often organized into several CMake scripts to encapsulate each part of the project. These navigation features work across your entire CMake project to offer more productivity than naïve text search across files and folders. They are also integrated with other IDE productivity f...

JCC Erratum Mitigation in MSVC
Feb 4, 2020
Post comments count 2
Post likes count 0

JCC Erratum Mitigation in MSVC

Gautham Beeraka (Intel Americas Inc)
Gautham Beeraka (Intel Americas Inc)

The content of this blog was provided by Gautham Beeraka from Intel Corporation. Intel recently announced Jump Conditional Code (JCC) Erratum which can occur in some of its processors. The MSVC team has been working with Intel to provide a software fix in the compiler to mitigate the performance impact of the microcode update that prevents the erratum. Introduction There are three things one should know about JCC erratum: Each of these topics are explained below. JCC Erratum The processors listed in Intel’s white paper referenced above have an erratum which can occur under certain cond...

Improve Parallelism in MSBuild
Jan 29, 2020
Post comments count 17
Post likes count 0

Improve Parallelism in MSBuild

Felix Huang
Felix Huang

Starting in Visual Studio 2019 16.3, we have been adding features to improve build parallelism.

MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4
Jan 28, 2020
Post comments count 9
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4

Kevin Cadieux
Kevin Cadieux

Versions 16.3 and 16.4 of Visual Studio 2019 brought many new improvements in code generation quality, build throughput, and security. If you still haven’t downloaded your copy, here is a brief overview of what you’ve been missing out on. Demonstration of C++ Build Insights, a new set of build analysis tools in Visual Studio 2019 version 16.4. Visual Studio 2019 version 16.3 Visual Studio 2019 version 16.4 Do you want to benefit from all of these improvements? If so, download the latest Visual Studio ...

CMake, Linux targeting, and IntelliSense improvements in Visual Studio 2019 version 16.5 Preview 2
Jan 24, 2020
Post comments count 2
Post likes count 1

CMake, Linux targeting, and IntelliSense improvements in Visual Studio 2019 version 16.5 Preview 2

Erika Sweet
Erika Sweet

Visual Studio’s native support for CMake allows you to target both Windows and Linux from the comfort of a single IDE. Visual Studio 2019 version 16.5 Preview 2 introduces several new features specific to cross-platform development, including: File copy optimizations for CMake projects targeting a remote Linux system Visual Studio automatically copies source files from your local Windows machine to your remote Linux system when building and debugging on Linux. In Visual Studio 2019 version 16.5 this behavior has been optimized. Visual Studio now keeps a "fingerprint file" of the ...

C++ Modules conformance improvements with MSVC in Visual Studio 2019 16.5
Jan 22, 2020
Post comments count 12
Post likes count 0

C++ Modules conformance improvements with MSVC in Visual Studio 2019 16.5

Cameron DaCamara
Cameron DaCamara

C++20 is right around the corner. Along with the new standard comes the much anticipated Modules feature! The compiler team initially announced that we were working on the Modules TS back in 2017 and since then we have been hard at work improving the feature and improving compiler conformance around this feature. We finally feel it is time to share some of the progress we have made on the conformance front for Modules. What's new? Header Unit Support In C++20 [module.import]/5 describes the import of a new translation unit type, the header unit. The semantics of this type of import are ...

Improvements to Accuracy and Performance of Linux IntelliSense
Jan 10, 2020
Post comments count 1
Post likes count 0

Improvements to Accuracy and Performance of Linux IntelliSense

Erika Sweet
Erika Sweet

This blog post was written by Paul Maybee, a Principal Software Engineer on the C++ Cross-Platform Team.  Accurate C++ IntelliSense requires access to the C++ headers that are referenced by C++ source files. For Linux scenarios the headers referenced by a Linux MSBuild or CMake project are copied to Windows by Visual Studio from the Linux device (or VM, or Docker container, or WSL system) being targeted for the build. Visual Studio then uses these headers to provide IntelliSense. If the headers are not the correct versions, for example they are gcc headers rather than clang headers, or C++11 headers rather tha...

C++ Inliner Improvements: The Zipliner
Jan 7, 2020
Post comments count 0
Post likes count 0

C++ Inliner Improvements: The Zipliner

David Hartglass
David Hartglass

Visual Studio 2019 versions 16.3 and 16.4 include improvements to the C++ inliner. Among these is the ability to inline some routines after they have been optimized, referred to as the “Zipliner.” Depending on your application, you may see some minor code quality improvements and/or major build-time (compiler throughput) improvements.  C2 Inliner Terry Mahaffey has provided an overview of Visual Studio’s inlining decisions. This details some of the inliner’s constraints and areas for improvement, a few of which are particularly relevant here:  Modern C++ Unfortunately, many of the coding patte...

Debugging Linux CMake Projects with gdbserver
Dec 18, 2019
Post comments count 1
Post likes count 0

Debugging Linux CMake Projects with gdbserver

Erika Sweet
Erika Sweet

Update 2/20/20: We have addressed a bug which allows you to debug simple CMake projects using one level of CMakeLists.txt files with gdbserver in Visual Studio 2019 version 16.5 Preview 3. The example launch configuration has been updated below. Gdbserver is a program that allows you to remotely debug applications running on Linux. It is especially useful in embedded scenarios where your target system may not have the resources to run the full gdb. Visual Studio 2019 version 16.5 Preview 1 enables remote debugging of CMake projects with gdbserver. In our previous blog post we showed you how to build a C...

Build C++ Applications in a Linux Docker Container with Visual Studio
Dec 13, 2019
Post comments count 8
Post likes count 1

Build C++ Applications in a Linux Docker Container with Visual Studio

Erika Sweet
Erika Sweet

Docker containers provide a consistent development environment for building, testing, and deployment. The virtualized OS, file system, environment settings, libraries, and other dependencies are all encapsulated and shipped as one image that can be shared between developers and machines. This is especially useful for C++ cross-platform developers because you can target a container that runs a different operating system than the one on your development machine. In this blog post we’re going to use Visual Studio’s native CMake support to build a simple Linux application in a Linux docker container over SSH. This...

CMake Tools Extension for Visual Studio Code
Nov 21, 2019
Post comments count 0
Post likes count 0

CMake Tools Extension for Visual Studio Code

Erika Sweet
Erika Sweet

Microsoft is now the primary maintainer of the CMake Tools extension for Visual Studio Code. The extension was created and previously maintained by vector-of-bool, who has moved on to other things. Thank you vector-of-bool for all of your hard work getting this extension to where it is today! About the extension The CMake Tools extension provides developers with a convenient and powerful workflow for configuring, building, browsing, and debugging CMake-based projects in Visual Studio Code. You can visit the CMake Tools documentation and the extension’s GitHub repository to get started and learn more. The fol...

Set Environment Variables for Debug, Launch, and Tools with CMake and Open Folder
Nov 18, 2019
Post comments count 2
Post likes count 0

Set Environment Variables for Debug, Launch, and Tools with CMake and Open Folder

Will Buik
Will Buik

There are many reasons why you may want to customize environment variables. Many build systems use environment variables to drive behavior; debug targets sometimes need to have PATH customized to ensure their dependencies are found; etc. Visual Studio has a mechanism to customize environment variables for debugging and building CMake projects and C++ Open Folder. In Visual Studio 2019 16.4 we made some changes to simplify this across Visual Studio’s JSON configuration files. This post is going to cover how to use this feature from the ground up with the new changes since not everyone may be familiar with how a...

Electronic Arts and Visual Studio’s Linux Support
Nov 7, 2019
Post comments count 8
Post likes count 0

Electronic Arts and Visual Studio’s Linux Support

Erika Sweet
Erika Sweet

Electronic Arts (EA) is using Visual Studio’s cross-platform support to cross-compile on Windows and debug on Linux. The following post is written by Ben May, a Senior Software Engineer of Engineering Workflows at EA. Thanks Ben and EA for your partnership, and for helping us make Visual Studio the best IDE for C++ cross-platform development. At EA our Frostbite Engine has a Linux component used for our dedicated servers that service many of our most popular games.  When we saw that Microsoft was adding support for Linux in a workload in Visual Studio, this caught my interest!  At EA our game developers are us...

Introducing C++ Build Insights
Nov 5, 2019
Post comments count 33
Post likes count 2

Introducing C++ Build Insights

Kevin Cadieux
Kevin Cadieux

C++ builds should always be faster. In Visual Studio 2019 16.2, we’ve shown our commitment to this ideal by speeding up the linker significantly. Today, we are thrilled to announce a new collection of tools that will give you the power to make improvements of your own. If you've ever had time for breakfast while building C++, then you may have asked yourself: what is the compiler doing? C++ Build Insights is our latest take at answering this daunting question and many others. By combining new tools with tried-and-tested Event Tracing for Windows (ETW), we’re making timing information for our C++ toolchain more ac...

Visual Studio Code C++ extension: Nov 2019 update
Nov 4, 2019
Post comments count 5
Post likes count 0

Visual Studio Code C++ extension: Nov 2019 update

Marian Luparu
Marian Luparu

Find All References, Rename Symbol refactoring, support for localization, new navigation breadcrumb controls, and improvements to the Outline view are only a few of the improvements in the November 2019 update of Visual Studio Code C++ extension.

An Update on C++/CLI and .NET Core
Nov 1, 2019
Post comments count 28
Post likes count 0

An Update on C++/CLI and .NET Core

Will Buik
Will Buik

The first public release of our C++/CLI support for .NET Core 3.1 is now available for public preview! It is included in Visual Studio 2019 update 16.4 Preview 2. We would love it if you could try it out and send us any feedback you have. For more info about what this is and the roadmap going forward, check out my last post on the future of C++/CLI and .NET Core. To get started make sure you have all the necessary components installed. C++/CLI support for desktop development is an optional component, so you will need to select it on the installer’s right pane: You will also need the .NET Core cross-plat...

Microsoft C++ Team At CppCon 2019: Videos Available
Oct 30, 2019
Post comments count 4
Post likes count 0

Microsoft C++ Team At CppCon 2019: Videos Available

Sy Brand
Sy Brand

Last month a large contingent from the Microsoft C++ team attended CppCon. We gave fourteen presentations covering our tools, developments in the standard, concepts which underlie the work we do, and more. We also recorded an episode of CppCast with Microsoft MVPs Rob Irving and Jason Turner. You can hear more about the Open Sourcing of MSVC's STL, the upcoming ASAN support in Visual Studio and our team's effort in achieving C++17 standards conformance. All our CppCon videos are available now, so please give them a watch and let us know what you think! ...

AddressSanitizer (ASan) for Windows with MSVC
Oct 23, 2019
Post comments count 62
Post likes count 1

AddressSanitizer (ASan) for Windows with MSVC

Augustin Popa
Augustin Popa

⌚ This post was last updated on March 24th, 2021 with the latest information on ASan support. Note: This feature is now generally available. To get started, take a look at the official AddressSanitizer for Windows with MSVC documentation. Many experience improvements have been made since this blog post was published, and our docs have the latest information.   We are pleased to announce AddressSanitizer (ASan) support for the MSVC toolset. ASan is a fast memory error detector that can find runtime memory issues such as use-after-free and perform out of bounds checks. Support for sanitizers has been ...

Usability Improvements for CMake in Visual Studio 2019 version 16.4: Launch Target Selection and Overview Pages
Oct 15, 2019
Post comments count 4
Post likes count 0

Usability Improvements for CMake in Visual Studio 2019 version 16.4: Launch Target Selection and Overview Pages

Erika Sweet
Erika Sweet

We hear your feedback, and in Visual Studio 2019 version 16.4 Preview 2 we have addressed one of our top Developer Community issues related to CMake development in Visual Studio by revamping the selection of CMake launch targets. We have also added Overview Pages for CMake to help you get started with CMake and cross-platform development. If you’re not familiar with Visual Studio's CMake support, be sure to check our CMake Support in Visual Studio introductory page. Launch Target Selection In Visual Studio 2019 you can select a CMake target to run via the launch drop-down menu: With Visual Studio 2019 ve...

Code analysis with clang-tidy in Visual Studio
Oct 8, 2019
Post comments count 13
Post likes count 1

Code analysis with clang-tidy in Visual Studio

eli fessler
eli fessler

[Updated on 11/6/2019] - Removed "Setup: Installing Clang tools" section; this is no longer required starting in Visual Studio 2019 version 16.4 Preview 3. Visual Studio 2019 version 16.4 Preview 1 brings a significant improvement to the C++ code analysis experience: native support for clang-tidy, a Clang-based “linter” tool developed by the LLVM Project that delivers a variety of code improvements such as modernization and standards conformance, static analysis, and automatic formatting. For more information about using Clang/LLVM as a compiler in your project, see our past blog posts on Clang/LLVM for MSBuil...

C++20’s Conditionally Explicit Constructors
Oct 1, 2019
Post comments count 4
Post likes count 0

C++20’s Conditionally Explicit Constructors

Sy Brand
Sy Brand

is a C++20 feature for simplifying the implementation of generic types and improving compile-time performance. In C++ it is common to write and use types which wrap objects of other types. and are two examples, but there are plenty of others in the standard library, Boost, and likely your own codebases. Following the principle of least astonishment, it pays to ensure that these wrappers preserve the behavior of their stored types as much as is reasonable. Take as an example. It allows implicit conversion from a string literal, but not from a : This is achieved in by marking the constructor which tak...

Microsoft C++ Team on CppCast
Sep 30, 2019
Post comments count 0
Post likes count 0

Microsoft C++ Team on CppCast

Sy Brand
Sy Brand

Today we have a short guest post from Rob Irving, host of CppCast to tell us about an episode he recorded with our team.   During CppCon 2019 the hosts of CppCast had a chance to sit down with Marian Luparu, Sy Brand and Stephan T. Lavavej from Microsoft's C++ team to discuss some of the announcements made by the team at CppCon. For those not familiar with CppCast. It's an audio podcast hosted by Microsoft MVPs Rob Irving and Jason Turner. This latest episode is the 216th of the (almost) weekly podcast that started in 2015. In each ~40-60 minute episode they talk to a member of the C++ community...

The Future of C++/CLI and .NET Core 3
Sep 23, 2019
Post comments count 15
Post likes count 0

The Future of C++/CLI and .NET Core 3

Will Buik
Will Buik

.NET Core 3.0 is now available and we have received a lot of questions about what that means for the future of C++/CLI. First, we would like to let everyone know that we are committed to supporting C++/CLI for .NET Core to enable easy interop between C++ codebases and .NET technologies such as WPF and Windows Forms. This support isn’t going to be ready when .NET Core 3.0 first ships, but it will be available in .NET Core 3.1 which ships with Visual Studio 2019 16.4 – roadmap. C++/CLI will have full IDE support for targeting .NET Core 3.1 and higher. This support will include projects, IntelliSense, and mixed-m...

Open Sourcing MSVC’s STL
Sep 16, 2019
Post comments count 12
Post likes count 0

Open Sourcing MSVC’s STL

Stephan T. Lavavej - MSFT
Stephan T. Lavavej - MSFT

Today at CppCon 2019, we (the MSVC team) announced that we're releasing our implementation of the C++ Standard Library (also known as the STL) as open source. https://github.com/microsoft/STL is our new repository, containing all of our product source code, a new CMake build system, and a README with more information. As it explains, we're still working on migrating to GitHub. While you can clone and build the code right now, there are several things we need to do (like adding our test suites) before we can begin reviewing pull requests. Q&A Q: Why are you doing this? A: There are several reasons....

C++20 Concepts Are Here in Visual Studio 2019 version 16.3
Sep 10, 2019
Post comments count 15
Post likes count 0

C++20 Concepts Are Here in Visual Studio 2019 version 16.3

Xiang Fan
Xiang Fan

C++20 Concepts are now available for the first time in Visual Studio 2019 version 16.3 Preview 2. This includes both the compiler and standard library support, but not the intellisense support.

Microsoft C++ Team at CppCon 2019
Sep 6, 2019
Post comments count 5
Post likes count 0

Microsoft C++ Team at CppCon 2019

Sy Brand
Sy Brand

The Microsoft C++ team will have a booth and many talks covering a wide range of topics at CppCon 2019. Come say hi to our team outside Aurora D and attend our talks to learn what's new in our tooling, dive into new features in the standard, and hear some exciting announcements! We'll also be running a survey on the C++ ecosystem and giving away an Xbox One S to one participant. We'll put the link here when it's available, but you'll also be able to find it by stopping by the booth or coming to any of our talks: Monday, September 16th 14:00 - 15:00: Hello World From Scratch by Sy Brand and Peter Binde...

Build and Debug MySQL on Linux with Visual Studio 2019
Aug 22, 2019
Post comments count 1
Post likes count 0

Build and Debug MySQL on Linux with Visual Studio 2019

Erika Sweet
Erika Sweet

The MySQL Server Team recently shared on their blog how to use Visual Studio 2019 to edit, build, and debug MySQL on a remote Linux server. This leverages Visual Studio’s native support for CMake and allows them to use Visual Studio as a front-end while outsourcing all the “heavy lifting” (compilation, linking, running) to a remote Linux machine.   “I’ve recently found myself using Microsoft Visual Studio on my laptop as my ‘daily driver.’ I have a history with VS. But I also really like how the product is developing as of late. The pace of innovation is great and the team behind it extremely responsive. T...

C++ Cross-Platform Development with Visual Studio 2019 version 16.3: vcpkg, CMake configuration, remote headers, and WSL
Aug 16, 2019
Post comments count 0
Post likes count 0

C++ Cross-Platform Development with Visual Studio 2019 version 16.3: vcpkg, CMake configuration, remote headers, and WSL

Erika Sweet
Erika Sweet

In Visual Studio 2019 you can target both Windows and Linux from the comfort of a single IDE. Visual Studio’s native support for CMake lets you open any folder containing C++ code and a CMakeLists.txt file directly in Visual Studio to edit, build, and debug your CMake project on Windows, Linux, and the Windows Subsystem for Linux (WSL). Visual Studio’s MSBuild-based Linux support allows you to create and debug console applications that execute on a remote Linux system or WSL. For either of these scenarios, the Linux development with C++ workload is required.   Visual Studio 2019 version 16.3 Preview 2 introduc...

Vcpkg: 2019.07 Update
Aug 15, 2019
Post comments count 4
Post likes count 0

Vcpkg: 2019.07 Update

Tara Raj
Tara Raj

The 2019.07 update of vcpkg, a tool that helps you manage C and C++ libraries on Windows, Linux, and macOS, is now available. This update is a summary of the new functionality and improvements made to vcpkg over the past month. Last month was the first time we created a vcpkg release (Vcpkg: 2019.06 Update). In this post, we will cover caching in Azure Pipelines with vcpkg in addition to many new port and triplet updates, improvements for port contributors, and new documentation. For a full list of this release’s improvements, check out our changelog on GitHub. Caching in Azure Pipelines with vcpkg The publi...

Productivity Improvements for C++: New Default Colorization, Template Argument Filtering in Call Stack Window, and IntelliCode On-By-Default
Aug 14, 2019
Post comments count 10
Post likes count 0

Productivity Improvements for C++: New Default Colorization, Template Argument Filtering in Call Stack Window, and IntelliCode On-By-Default

Nick Uhlenhuth
Nick Uhlenhuth

New Default Semantic Colorization In Visual Studio 2019 version 16.3 Preview 2 we’ve introduced a new default semantic colorization scheme for C++. For a long time, many of the default colors were simply black. However, colorization can help you quickly understand the structure of code at a glance. To take advantage of this, we’ve created two new color schemes, and of course you can still customize your colors further by typing “Change font” in the Ctrl + Q search bar. Under Tools > Options > Text Editor > C++ > View > Color Scheme you can now pick between three presets: Enhanced, Enhanced (Glo...

New C++ Core Check Rules
Aug 13, 2019
Post comments count 2
Post likes count 0

New C++ Core Check Rules

Jordan Maples
Jordan Maples

The C++ Core Guidelines Checker receives three new rules with the release of Visual Studio version 16.3 Preview 2. In addition, some warnings published in the warnings.h that ships with Visual Studio have been moved or renamed. Below is a quick summary of these additions. For more detailed information, please see the C++ Core Guidelines Checker Reference documentation. If you’re just getting started with native code analysis tools, take a look at our introductory quick start for Code Analysis for C/C++. New rule set The "Enum Rules" set has been added in this release. It can be enabled by selecting "C++ C...

Side-by-side Minor Version MSVC Toolsets in Visual Studio 2019
Aug 13, 2019
Post comments count 1
Post likes count 0

Side-by-side Minor Version MSVC Toolsets in Visual Studio 2019

Will Buik
Will Buik

Visual Studio 2019 version 16.1 Preview 3 ships with the first side-by-side minor versions of the v142 MSVC toolset. We first shipped minor side-by-side versions of MSVC toolsets with Visual Studio 2017, but a few things have changed in 2019. This post covers what’s new; primarily more granular versions of the toolsets in the installer and support for CMake projects. For those not familiar with these minor version MSVC toolsets, I recommend checking out our previous post about minor side-by-side toolsets. It includes many more details about when and how you should use this feature. In general, you should not n...

Game performance improvements in Visual Studio 2019 version 16.2
Aug 8, 2019
Post comments count 2
Post likes count 0

Game performance improvements in Visual Studio 2019 version 16.2

Natalia Glagoleva
Natalia Glagoleva

This spring Gratian Lup described in his blog post the improvements for C++ game development in Visual Studio 2019. From Visual Studio 2019 version 16.0 to Visual Studio 2019 version 16.2 we’ve made some more improvements. On the Infiltrator Demo we’ve got 2–3% performance wins for the most CPU-intensive parts of the game. Throughput A huge throughput improvement was done in the linker! Check our recent blogpost on Improved Linker Fundamentals in Visual Studio 2019. New Optimizations A comprehensive list of new and improved C++ compiler optimizations can be found in a recent blogpost on MSVC Backend Updates i...

Improving the Performance of Standard Library Functions
Jul 30, 2019
Post comments count 5
Post likes count 0

Improving the Performance of Standard Library Functions

Kirsten Lee
Kirsten Lee

In Visual Studio 2019 version 16.2 we improved the codegen of several standard library functions. Guided by your feedback on Developer Community (Inlining std::lldiv and Improved codegen for std::fmin, std::fmax, std::round, std::trunc) we focused on the variants of standard division (, , ) and . Originally function calls to the standard library, rather than inline assembly instructions, were generated upon each invocation of variations of and , regardless of the compiler optimization flags passed. Since these standard library function definitions live inside of the runtime, their definitions are opaque to th...

Smarter Member List Filtering for C++ 
Jul 29, 2019
Post comments count 2
Post likes count 0

Smarter Member List Filtering for C++ 

Nick Uhlenhuth
Nick Uhlenhuth

We are always looking for ways to make you more productive while coding in Visual Studio. In Visual Studio 2019 version 16.2, we have created a smarter, more relevant Member List. Specifically, we now apply method filtering based on type qualifiers. To illustrate this, consider the following example:  You have two vectors, but one is . When we invoke the member list on the non-const vector, we see the option for . However, when we invoke the member list on the const vector, Visual Studio now knows not to display any non-const members on a const object:    Even More Filtering  If you wish to benefit furthe...

MSVC Backend Updates in Visual Studio 2019 version 16.2
Jul 25, 2019
Post comments count 3
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 version 16.2

Daniel Donenfeld
Daniel Donenfeld

In Visual Studio 2019 version 16.2 we continue to improve the C++ backend with build throughput improvements and new and improved optimizations. These build on top of our MSVC backend improvements in Visual Studio 2019 version 16.0 which we previously announced. We will be following up on many of the improvements here with their own blog posts. Build Throughput Improvements New and Improved Optimizations Inliner Improvements Improved Code Generation and Optimization of Intrinsics Vectorizer Improvements New Analysis Passes General Optimizer Impr...

Improved Linker Fundamentals in Visual Studio 2019
Jul 25, 2019
Post comments count 11
Post likes count 0

Improved Linker Fundamentals in Visual Studio 2019

Russell Hadley
Russell Hadley

On the C++ team we’ve heard loud and clear from users that build times are a pain point. We’ve continued our focus on improving the step, linking, that dominates F5 build times. Fast F5 build times, or iteration build times, are a key contributor to developer productivity and we felt that there was a large opportunity so we narrowed in on changes that we felt could move the needle 2x or more. This is on top of the significant improvements we made to the tool chain to speed up link times in the Visual Studio 2019 version 16.0 release. Let me give a teaser of the kinds of wins we were able to achieve.  ...

Visual Studio Code C/C++ Extension: July 2019 Update
Jul 24, 2019
Post comments count 1
Post likes count 0

Visual Studio Code C/C++ Extension: July 2019 Update

Tara Raj
Tara Raj

The July 2019 update of the Visual Studio Code C/C++ extension is now available. This release includes many new features, including semantic colorization and improvements to the IntelliSense Configuration Settings Editor UI and IntelliSense cache. For a full list of this release’s improvements, check out our release notes on GitHub. Semantic Colorization Semantic colorization support has been one of the top asks on our GitHub repo for the past few years. We faced many challenges in creating support for semantic colorization for the C/C++ extension since there is no VS Code API for semantic source highlighting a...

Inlining Decisions in Visual Studio
Jul 24, 2019
Post comments count 3
Post likes count 0

Inlining Decisions in Visual Studio

Terry Mahaffey
Terry Mahaffey

Introduction My name is Terry Mahaffey and I work on the code generation team in MSVC. Lately I’ve been doing some work on our inliner and I wanted to give a brief introduction to it before later diving into some of the changes we’ll be shipping. Inlining is perhaps the most important optimization a compiler performs. In addition to removing call overhead, an inline decision is most useful when it exposes additional optimization opportunities not present in either the caller or callee by themselves. For example: It is a really good idea to inline bar into foo in this example; once that is done the compiler...

Vcpkg: 2019.06 Update
Jul 19, 2019
Post comments count 4
Post likes count 0

Vcpkg: 2019.06 Update

Tara Raj
Tara Raj

The 2019.06 update of vcpkg, a tool that helps you manage C and C++ libraries on Windows, Linux, and MacOS, is now available. This is the first time we’ve created a vcpkg release on our GitHub repository. This update is designed to bring you a summary of the new functionality and improvements made to vcpkg over about a month’s time. The 2019.06 update covers the month of June. This release includes many new ports and triplet updates including overlay options, improvements for port contributors, and new documentation. For a full list of this release’s improvements, check out our release notes on GitHub. Ports ...

Clang/LLVM Support for MSBuild Projects
Jul 11, 2019
Post comments count 7
Post likes count 0

Clang/LLVM Support for MSBuild Projects

Will Buik
Will Buik

Visual Studio 2019 version 16.2 Preview 3 includes built-in Clang/LLVM support for MSBuild projects. In our last release, we announced support for Clang/LLVM for CMake. In the latest Preview of Visual Studio, we have extended that support to also include MSBuild projects. While in most cases we recommend using the MSVC compiler, we are committed to making Visual Studio one of the most comprehensive IDEs on Windows. You may want to use Clang instead if you are developing cross platform code, especially if it already depends on Clang or GCC extensions. You can now use Clang/LLVM to target both Windows and Linux usi...

Simplify Your Code With Rocket Science: C++20’s Spaceship Operator
Jun 27, 2019
Post comments count 10
Post likes count 1

Simplify Your Code With Rocket Science: C++20’s Spaceship Operator

Cameron DaCamara
Cameron DaCamara

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's post is by Cameron DaCamara. C++20 adds a new operator, affectionately dubbed the "spaceship" operator: . There was a post awhile back by our very own Sy Brand detailing some information regarding this new operator along with some conceptual information about what it is and does.  The goal of this...

Cppp 2019 Trip Report
Jun 25, 2019
Post comments count 0
Post likes count 0

Cppp 2019 Trip Report

Sy Brand
Sy Brand

Summary CPPP is a new C++ conference in Paris, France. Its first iteration ran for a single day with three parallel tracks, drawing in 160 attendees. The conference great on all fronts: the speakers & talks were varied and high-quality, the venue was right next to the Eiffel Tower and had plenty of space, the food was tasty and varied (shoutout to the cream filled pastries), and the day went smoothly with strong communication from the organisers (Joel Falcou and Fred Tingaud). The three tracks were themed on roughly beginner, intermediate, and expert content, where the beginner track was in French an...

Clear, Functional C++ Documentation with Sphinx + Breathe + Doxygen + CMake
Jun 3, 2019
Post comments count 11
Post likes count 3

Clear, Functional C++ Documentation with Sphinx + Breathe + Doxygen + CMake

Sy Brand
Sy Brand

Writing good documentation is hard. Tools can’t solve this problem in themselves, but they can ease the pain. This post will show you how to use Sphinx to generate attractive, functional documentation for C++ libraries, supplied with information from Doxygen. We’ll also integrate this process into a CMake build system so that we have a unified workflow. For an example of a real-world project whose documentation is built like this, see fmtlib. Why Sphinx? Doxygen has been around for a couple of decades and is a stable, feature-rich tool for generating documentation. However, it is not without its issues. Docs...

CMake 3.14 and Performance Improvements
May 28, 2019
Post comments count 7
Post likes count 0

CMake 3.14 and Performance Improvements

Justin Goshi
Justin Goshi

In Visual Studio 2019 version 16.1 we have updated the version of CMake we ship inbox to CMake 3.14. This comes with performance improvements for extracting generated build system information. Additionally, we now support virtually all the Visual Studio capabilities regardless of the CMake binary origin so long as the CMake version is at least 3.14. The main reason for this is the introduction of the file-based API, which we now support, and which provides a new way for retrieving semantic information. This is now the recommended way to connect an IDE to CMake, the old CMake server being deprecated, and we are an...

Quick Info Improvements in Visual Studio 2019: Colorization and Search Online
May 14, 2019
Post comments count 14
Post likes count 0

Quick Info Improvements in Visual Studio 2019: Colorization and Search Online

Nick Uhlenhuth
Nick Uhlenhuth

The Quick Info tooltip has received a couple of improvements in Visual Studio 2019 version 16.1 Preview 3.  Quick Info Colorization  While Quick Info was previously all black text, the tooltip now respects the semantic colorization of your editor:    If you’d like to customize your semantic colorization, you can do that by searching “font” in the Visual Studio Search box (Ctrl + Q), or by navigating to Tools > Options > Environment > Fonts and Colors:    Quick Info Search Online  The Quick Info tooltip has a new “Search Online” link that will search for online docs to learn more about the ho...

Visualize your build with IncrediBuild’s Build Monitor and Visual Studio 2019
May 13, 2019
Post comments count 5
Post likes count 0

Visualize your build with IncrediBuild’s Build Monitor and Visual Studio 2019

Nick Uhlenhuth
Nick Uhlenhuth

There’s seeing your build, and then there’s REALLY seeing your build. The difference can be quite dramatic, unveiling a new world of possibilities. As part of a partnership between IncrediBuild and Visual Studio, you can enjoy these possibilities directly within Visual Studio. We previously discussed IncrediBuild, a software acceleration technology that speeds up your builds, tests, and other development process times. While IncrediBuild’s solution is known mainly for its impressive development acceleration capabilities, there’s another, very interesting capability to take note of: IncrediBuild’s Build Monitor...

Linux Development with C++ in Visual Studio 2019: WSL, ASan for Linux, Separation of Build and Debug
May 10, 2019
Post comments count 22
Post likes count 0

Linux Development with C++ in Visual Studio 2019: WSL, ASan for Linux, Separation of Build and Debug

Erika Sweet
Erika Sweet

In Visual Studio 2019 you can target both Windows and Linux from the comfort of a single IDE. In Visual Studio 2019 version 16.1 Preview 3 we announced several new features specific to the Linux Workload: native support for the Windows Subsystem for Linux (WSL), AddressSanitizer integration, and the ability to separate build and debug targets. If you’re just getting started with cross-platform development, I recommend trying our native support for WSL. Native support for the Windows Subsystem for Linux (WSL) Visual Studio now provides native support for using C++ with WSL. WSL lets you run a lightweight Linux e...

AddressSanitizer (ASan) for the Linux Workload in Visual Studio 2019
May 8, 2019
Post comments count 7
Post likes count 0

AddressSanitizer (ASan) for the Linux Workload in Visual Studio 2019

Erika Sweet
Erika Sweet

In Visual Studio 2019 version 16.1 Preview 3 we have integrated AddressSanitizer (ASan) into Visual Studio for Linux projects. ASan is a runtime memory error detector for C/C++ that catches the following errors: You can enable ASan for MSBuild-based Linux projects and CMake projects that target a remote Linux system or WSL (Windows Subsystem for Linux). If you are just getting started with cross-platform development, I recommend following this walk-through to get started with Visual Studio’s native support for WSL. ASan detects errors that are encountered during program execution a...

New code analysis quick fixes for uninitialized memory (C6001) and use before init (C26494) warnings
May 7, 2019
Post comments count 9
Post likes count 0

New code analysis quick fixes for uninitialized memory (C6001) and use before init (C26494) warnings

eli fessler
eli fessler

In the latest Preview release of Visual Studio 2019 version 16.1, we’ve added two quick fixes to the Code Analysis experience focused around uninitialized variable checks. These quick fixes are available via the Quick Actions (lightbulb) menu on relevant lines, accessed by hovering over the line or squiggle, or by pressing Ctrl+Period. The first release of Visual Studio 2019 brought in-editor code analysis and various C++ productivity improvements, including a quick fix for the NULL to nullptr rule and others. In implementing further code analysis quick fixes, we are basing decisions on the following criteria:...

C++ with Visual Studio 2019 and Windows Subsystem for Linux (WSL)
May 6, 2019
Post comments count 50
Post likes count 0

C++ with Visual Studio 2019 and Windows Subsystem for Linux (WSL)

Erika Sweet
Erika Sweet

This post was updated on December 11, 2020 Visual Studio 2019 version 16.1 added native support for using C++ with the Windows Subsystem for Linux (WSL). WSL lets you run a lightweight Linux environment directly on Windows, including most command-line tools, utilities, and applications. In Visual Studio you no longer need to add a remote connection or configure SSH in order to build and debug on your local WSL installation. This will save you time getting up and running in a Linux environment and eliminates the need to copy and maintain sources on a remote machine. In order to use our native support for WSL yo...

Visual Studio Code C/C++ extension: May 2019 Update
May 3, 2019
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension: May 2019 Update

Tara Raj
Tara Raj

The May 2019 update of the Visual Studio Code C/C++ extension is now available to C/C++ extension Insiders. This release includes many new features, including Visual Studio Code Remote Development extensions with C/C++, an IntelliSense Configurations settings UI, and IntelliSense improvements.

Clang/LLVM Support in Visual Studio
Apr 24, 2019
Post comments count 27
Post likes count 0

Clang/LLVM Support in Visual Studio

Will Buik
Will Buik

Visual Studio 2019 version 16.1 Preview 2 comes with support for Clang/LLVM out-of-the-box. Visual Studio has had great tooling for MSVC and GCC for quite a while now. The latest preview brings Clang into the fold. Visual Studio 2019 includes out of the box support for editing, building, and debugging CMake projects with Clang/LLVM. If you use MSBuild projects, however, don’t worry. Support for MSBuild based .vcxproj projects is coming soon as well. If you are not familiar with Visual Studio’s CMake, support check out how to get started. If you are developing on Windows and targeting Clang, we hope to make ...

Visual Studio CMake Support – Clang/LLVM, CMake 3.14, Vcpkg, and Performance Improvements
Apr 24, 2019
Post comments count 4
Post likes count 0

Visual Studio CMake Support – Clang/LLVM, CMake 3.14, Vcpkg, and Performance Improvements

Will Buik
Will Buik

We’ve introduced a bunch of improvements to our CMake support in the latest preview of Visual Studio 2019 Update 1. The latest release includes Clang/LLVM support, CMake 3.14, better vcpkg integration, and many more enhancements. If you are not familiar with Visual Studio’s CMake support, check out how to get started.

Improved C++ IntelliCode now Ships with Visual Studio 2019
Apr 24, 2019
Post comments count 3
Post likes count 0

Improved C++ IntelliCode now Ships with Visual Studio 2019

Nick Uhlenhuth
Nick Uhlenhuth

IntelliCode support for C++ previously shipped as an extension, but it is now an in-box component that installs with the “Desktop Development with C++” workload in Visual Studio 2019 16.1 Preview 2. Make sure that IntelliCode is active for C++ by enabling the “C++ base model” under Tools > Options > IntelliCode > General:    This version of C++ IntelliCode also supports free-functions and has better accuracy. You can see the IntelliCode results starred at the top of the member list:    Talk to Us!   We’d love for you to download Visual Studio 2019 version 16.1 Preview 2 and enable IntelliCode ...

Visual Studio C++ Template IntelliSense Populates Based on Instantiations in Your Code
Apr 23, 2019
Post comments count 2
Post likes count 0

Visual Studio C++ Template IntelliSense Populates Based on Instantiations in Your Code

Nick Uhlenhuth
Nick Uhlenhuth

Ever since we announced Template IntelliSense, you all have given us great suggestions. One very popular suggestion was to have the Template Bar auto-populate candidates based on instantiations in your code. In Visual Studio 2019 version 16.1 Preview 2, we’ve added this functionality via an “Add All Existing Instantiations” option in the Template Bar dropdown menu. The following examples are from the SuperTux codebase.  The Template Bar dropdown menu now contains a new entry, "Add All Existing Instantiations".    Clicking the “Add All Existing Instantiations” option will populate the dropdown, so yo...

C++17/20 Features and Fixes in Visual Studio 2019
Apr 19, 2019
Post comments count 32
Post likes count 0

C++17/20 Features and Fixes in Visual Studio 2019

Stephan T. Lavavej - MSFT
Stephan T. Lavavej - MSFT

Visual Studio 2019 version 16.0 is now available and is binary compatible with VS 2015/2017. In this first release of VS 2019, we've implemented more compiler and library features from the C++20 Working Paper, implemented more overloads (C++17's "final boss"), and fixed many correctness, performance, and throughput issues. Here's a list of the C++17/20 compiler/library feature work and the library fixes. (As usual, many compiler bugs were also fixed, but they aren't listed here; compiler fixes tend to be specific to certain arcane code patterns. We recently blogged about compiler optimization and build throughpu...

Accelerating Compute-Intensive Workloads with Intel® AVX-512
Apr 19, 2019
Post comments count 2
Post likes count 0

Accelerating Compute-Intensive Workloads with Intel® AVX-512

Intel Corporation
Intel Corporation

This guest post was authored by Junfeng Dong, John Morgan, and Li Tian from Intel Corporation. Introduction Last year we introduced Intel® Advanced Vector Extensions 512 (Intel® AVX-512) support in Microsoft* Visual Studio* 2017 through this VC++ blog post. In this follow-on post, we cover some examples to give you a taste of how Intel® AVX-512 provides performance benefits. These examples include calculating the average of an array, matrix vector multiplication, and the calculation of the Mandelbrot set. Microsoft Visual Studio 2017 version 15.5 or later (we recommend the latest) is required to compile these d...

Visual Studio Code now available through Particle Workbench
Apr 16, 2019
Post comments count 0
Post likes count 0

Visual Studio Code now available through Particle Workbench

Marc Goodner
Marc Goodner

We’re excited to announce that Visual Studio Code is included in the new release of tooling for Particle IoT developers. Developers using the Particle platform can now use Visual Studio Code as their default editor for building IoT apps! Particle provides a widely-used IoT platform that consists of hardware, software, and connectivity. At their Spectra conference last year, Particle announced Particle Workbench, a professional IoT developer offering that includes Visual Studio Code. Particle Workbench and Visual Studio Code provide a free, ready to use experience to develop, program, and debug apps on P...

In-Editor Documentation for CMake in Visual Studio
Apr 15, 2019
Post comments count 3
Post likes count 0

In-Editor Documentation for CMake in Visual Studio

Erika Sweet
Erika Sweet

Visual Studio 2019 version 16.1 Preview 1 introduces in-editor documentation for CMake commands, variables, and properties. You can now leverage IntelliSense autocompletion and quick info tooltips when editing a CMakeLists.txt file, which will save you time spent outside of the IDE referencing documentation and make the process less error-prone. If you are just getting started with our native support for CMake, head over to our CMake Support in Visual Studio introductory page. You can use CMake to target multiple platforms from the comfort of a single IDE.  Quick info  Visual Studio now provides tooltips for CM...

Visual Studio Code C/C++ extension: March 2019 Update
Apr 4, 2019
Post comments count 4
Post likes count 0

Visual Studio Code C/C++ extension: March 2019 Update

Tara Raj
Tara Raj

The March 2019 update of the Visual Studio Code C/C++ extension is now available. This release includes many new features and bug fixes, including IntelliSense caching, Build and Debug Active File, and configuration squiggles. For a full list of this release’s improvements, check out our release notes on GitHub. IntelliSense Cache (AutoPCH) The extension will now cache header information to improve IntelliSense speed. This is similar to precompiled header files in Visual Studio. Please note that IntelliSense caching works on Linux, macOS 10.13+ (High Sierra and later versions), and Windows. Precompiled Headers...

SIMD Extension to C++ OpenMP in Visual Studio
Mar 27, 2019
Post comments count 13
Post likes count 0

SIMD Extension to C++ OpenMP in Visual Studio

Hongtao Yu
Hongtao Yu

In the era of ubiquitous AI applications there is an emerging demand of the compiler accelerating computation-intensive machine-learning code for existing hardware. Such code usually does mathematical computation like matrix transformation and manipulation and it is usually in the form of loops. The SIMD extension of OpenMP provides users an effortless way to speed up loops by explicitly leveraging the vector unit of modern processors. We are proud to start offering C/C++ OpenMP SIMD vectorization in Visual Studio 2019. The OpenMP C/C++ application program interface was originally designed to improve applicati...

Linker Throughput Improvement in Visual Studio 2019
Mar 20, 2019
Post comments count 0
Post likes count 0

Linker Throughput Improvement in Visual Studio 2019

YongKang Zhu
YongKang Zhu

In Visual Studio 2019 Preview 2 we made the compiler back-end to prune away debug information that is unrelated to code or data emitted into binary and changed certain hash implementations in the PDB engine, to improve linker throughput, which resulted in more than 2x reduction on link time for some large AAA game title. Debug Info Pruning This is to have the compiler back-end prune away debug info of any user defined types (UDTs) that are not referenced by any symbol record. This cuts down the size of OBJ sections holding debug info, like .debug$S which holds debug records for symbols and .debug$T which hold...

Game performance and compilation time improvements in Visual Studio 2019
Mar 19, 2019
Post comments count 12
Post likes count 0

Game performance and compilation time improvements in Visual Studio 2019

Gratian Lup
Gratian Lup

The C++ compiler in Visual Studio 2019 includes several new optimizations and improvements geared towards increasing the performance of games and making game developers more productive by reducing the compilation time of large projects. Although the focus of this blog post is on the game industry, these improvements apply to most C++ applications and C++ developers. Compilation time improvements One of the focus points of the C++ toolset team in the VS 2019 release is improving linking time, which in turn allows faster iteration builds and quicker debugging. Two significant changes to the linker help speed up t...

Making C++ Exception Handling Smaller On x64
Mar 7, 2019
Post comments count 36
Post likes count 1

Making C++ Exception Handling Smaller On x64

Modi Mo
Modi Mo

Visual Studio 2019 Preview 3 introduces a new feature to reduce the binary size of C++ exception handling (try/catch and automatic destructors) on x64. Dubbed FH4 (for __CxxFrameHandler4, see below), I developed new formatting and processing for data used for C++ exception handling that is ~60% smaller than the existing implementation resulting in overall binary reduction of up to 20% for programs with heavy usage of C++ exception handling. *Update 5/25/2019* Due to logistical issues we couldn't get FH4 turned default on in Update 1. Everything looks in place to have FH4 default on in an early preview of Up...

CUDA 10.1 available now, with support for latest Microsoft Visual Studio 2019 versions
Feb 27, 2019
Post comments count 0
Post likes count 0

CUDA 10.1 available now, with support for latest Microsoft Visual Studio 2019 versions

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

We are pleased to echo NVIDIA's announcement for CUDA 10.1 today, and are particularly excited about CUDA 10.1's continued compatibility for Visual Studio. CUDA 10.1 will work with RC, RTW and future updates of Visual Studio 2019. To stay committed to our promise for a Pain-free upgrade to any version of Visual Studio 2017 that also carries forward to Visual Studio 2019, we partnered closely with NVIDIA for the past few months to make sure CUDA users can easily migrate between Visual Studio versions. Congratulations to NVIDIA for this milestone and thank you for a great collaboration! A Bit of Background In var...

Open Existing CMake Caches in Visual Studio
Feb 27, 2019
Post comments count 1
Post likes count 0

Open Existing CMake Caches in Visual Studio

Will Buik
Will Buik

Visual Studio typically manages all the details of CMake for you, under the hood, when you open a project. However, some development workflows require more fine-grained control over how CMake is invoked. The latest Visual Studio 2019 Preview lets you have complete control over CMake if your project needs more flexibility. You can now give your custom or preferred tools complete control of your project’s CMake cache and build tree instead of letting Visual Studio manage it for you. In Visual Studio 2019 Preview 3, you can open CMake caches by opening a CMakeCache.txt file. This feature may sound familiar if...

Visual Studio 2019 Preview 2 Blog Rollup
Feb 15, 2019
Post comments count 8
Post likes count 0

Visual Studio 2019 Preview 2 Blog Rollup

Sy Brand
Sy Brand

Visual Studio 2019 Preview 2 was a huge release for us, so we’ve written a host of articles to explore the changes in more detail. For the short version, see the Visual Studio 2019 Preview 2 Release Notes. We’d love for you to download Visual Studio 2019 Preview, give it a try, and let us know how it’s working for you in the comments below or via email ([email protected]). If you encounter problems or have a suggestion, please let us know through Help > Send Feedback > Report A Problem / Provide a Suggestion or via Visual Studio Developer Community. You can...

Using VS Code for C++ development with containers
Feb 6, 2019
Post comments count 4
Post likes count 0

Using VS Code for C++ development with containers

Marc Goodner
Marc Goodner

This post builds on using multi-stage containers for C++ development. That post showed how to use a single Dockerfile to describe a build stage and a deployment stage resulting in a container optimized for deployment. It did not show you how to use a containers with your development environment. Here we will show how to use those containers with VS Code. The source for this article is the same as that of the previous article: the findfaces GitHub repo. Creating a container for use with VS Code VS Code has the capability to target a remote system for debugging. Couple that with a custom build task for compiling ...

What’s New in CMake – Visual Studio 2019 Preview 2
Feb 1, 2019
Post comments count 2
Post likes count 0

What’s New in CMake – Visual Studio 2019 Preview 2

Will Buik
Will Buik

We have made a bunch of improvements to Visual Studio’s CMake support in the latest preview of the IDE. Many of these changes are taking the first steps to close the gap between working with solutions generated by CMake and the IDE’s native support. Please try out the preview and let us know what you think. If you are new to CMake in Visual Studio, check out how to get started. CMake Menu Reorganization One of the first things you might notice when you open your CMake projects in Visual Studio 2019 Preview 2 is that the CMake menu has disappeared. Don’t worry, nothing is wrong. We just reorganized these item...

C++ Binary Compatibility and Pain-Free Upgrades to Visual Studio 2019
Jan 31, 2019
Post comments count 6
Post likes count 0

C++ Binary Compatibility and Pain-Free Upgrades to Visual Studio 2019

Marian Luparu
Marian Luparu

Visual Studio 2019 pushes the boundaries of individual and team productivity. We hope that you will find these new capabilities compelling and start your upgrade to Visual Studio 2019 soon. As you are considering this upgrade, rest assured that Visual Studio 2019 makes it distinctively easy to move your codebase from previous versions of Visual Studio. This post captures the reasons why your upgrade to Visual Studio 2019 will be pain-free. Side-by-side Visual Studio Installations You can install the latest version of Visual Studio on a computer that already has an earlier version installe...

Visual Studio Code C/C++ extension: January 2019 Update
Jan 31, 2019
Post comments count 4
Post likes count 0

Visual Studio Code C/C++ extension: January 2019 Update

Tara Raj
Tara Raj

[Updated on 11/4/2019] - Removed mentions of "Improved Member Function Completion" which is no longer supported based on user feedback. The January 2019 update of the Visual Studio Code C++ extension is now available. This release includes many new features and bug fixes including documentation comments support, improved #include autocomplete performance, and many IntelliSense bug fixes. For a full list of this release’s improvements, check out our release notes on Github. Documentation Comments We added support for documentation comments for hover, completion, and signature help. You can now see documentati...

New Code Analysis Checks in Visual Studio 2019: use-after-move and coroutine
Jan 28, 2019
Post comments count 0
Post likes count 0

New Code Analysis Checks in Visual Studio 2019: use-after-move and coroutine

Sunny Chatterjee
Sunny Chatterjee

Visual Studio 2019 Preview 2 is an exciting release for the C++ code analysis team. In this release, we shipped a new set of experimental rules that help you catch bugs in your codebase, namely: use-after-move and coroutine checks. This article provides an overview of the new rules and how you can enable them in your project. Use-after-move check C++11 introduced move semantics to help write performant code by replacing some expensive copy operations with cheaper move operations. With the new capabilities of the language, however, we have new ways to make mistakes. It’s important to have the tools to help find ...

Concurrency Code Analysis in Visual Studio 2019
Jan 28, 2019
Post comments count 0
Post likes count 0

Concurrency Code Analysis in Visual Studio 2019

Sunny Chatterjee
Sunny Chatterjee

Concurrency Code Analysis in Visual Studio 2019 The battle against concurrency bugs poses a serious challenge to C++ developers. The problem is exacerbated by the advent of multi-core and many-core architectures. To cope with the increasing complexity of multithreaded software, it is essential to employ better tools and processes to help developers adhere to proper locking discipline. In this blog post, we’ll walk through a completely rejuvenated Concurrency Code Analysis toolset we are shipping with Visual Studio 2019 Preview 2. A perilous landscape The most popular concurrent programming paradigm in use toda...

Introducing the New CMake Project Settings UI
Jan 24, 2019
Post comments count 0
Post likes count 0

Introducing the New CMake Project Settings UI

Erika Sweet
Erika Sweet

Visual Studio 2019 Preview 2 introduces a new CMake Project Settings Editor to help you more easily configure your CMake projects in Visual Studio. The editor provides an alternative to modifying the CMakeSettings.json file directly and allows you to create and manage your CMake configurations. If you’re just getting started with CMake in Visual Studio, head over to our CMake Support in Visual Studio introductory page. The goal of this editor is to simplify the experience of configuring a CMake project by grouping and promoting commonly used settings, hiding advanced settings, and making it easier to ed...

In-editor code analysis in Visual Studio 2019 Preview 2
Jan 24, 2019
Post comments count 1
Post likes count 0

In-editor code analysis in Visual Studio 2019 Preview 2

eli fessler
eli fessler

The C++ team has been working to refresh the Code Analysis experience inside Visual Studio. Last year, we blogged about some in-progress features in this area. We’re happy to announce that in Visual Studio 2019 Preview 2, we’ve integrated code analysis directly into the editor, improved upon previously experimental features, and enabled this as the default experience. In-editor warnings & background analysis Code analysis now runs automatically in the background, and warnings display as green squiggles in-editor. Analysis re-runs every time you open a file in the editor and when you save your changes. ...

C++ Productivity Improvements in Visual Studio 2019 Preview 2
Jan 24, 2019
Post comments count 1
Post likes count 0

C++ Productivity Improvements in Visual Studio 2019 Preview 2

Augustin Popa
Augustin Popa

Visual Studio 2019 Preview 2 contains a host of productivity features, including some new quick fixes and code navigation improvements: The Quick Actions menu can be used to select the quick fixes referenced below. You can hover over a squiggle and click the lightbulb that appears or open the menu with Alt + Enter. Quick Fix: Add missing #include Have you ever forgotten which header to reference from the C++ Standard Library to use a particular function or symbol? Now, Visual Studio will figure that out for you and offer to fix it: But this feature doesn’t just find...

Template IntelliSense Improvements for Visual Studio 2019 Preview 2
Jan 24, 2019
Post comments count 4
Post likes count 0

Template IntelliSense Improvements for Visual Studio 2019 Preview 2

Nick Uhlenhuth
Nick Uhlenhuth

In the first version of Template IntelliSense, we introduced the Template Bar which allowed you to provide sample arguments for your template in order to get a richer IntelliSense experience within the template body. Since then, we’ve received a lot of great feedback and suggestions which have led to significant improvements. Our latest iteration includes the following: Peek Window UI and Live Edits Clicking the edit button on the Template Bar no longer brings up a modal dialog instead, it opens a Peek Window. The benefit of the Peek Window UI is that it integrates more smoothly into your wo...

MSVC Backend Updates in Visual Studio 2019 Preview 2: New Optimizations, OpenMP, and Build Throughput improvements
Jan 24, 2019
Post comments count 2
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 Preview 2: New Optimizations, OpenMP, and Build Throughput improvements

Daniel Donenfeld
Daniel Donenfeld

In Visual Studio 2019 Preview 2 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and quality of life changes. New Features New and Improved Optimizations Build Throughput Improvements Quality of Life Improvements We’d love for you to download Visual Studio 2019 and give it a try. As always, we welcome your feedback. We can be reached via the comments below or via email ([email protected]). ...

Lifetime Profile Update in Visual Studio 2019 Preview 2
Jan 24, 2019
Post comments count 0
Post likes count 0

Lifetime Profile Update in Visual Studio 2019 Preview 2

Kyle Reed
Kyle Reed

The C++ Core Guidelines' Lifetime Profile, which is part of the C++ Core Guidelines, aims to detect lifetime problems, like dangling pointers and references, in C++ code. It uses the type information already present in the source along with some simple contracts between functions to detect defects at compile time with minimal annotation. These are the basic contracts that the profile expects code to follow: For more information on the history and goals of the profile, check out Herb Sutter's blog post about version 1.0. What's New in Visual Studio 2019 Preview 2 In Preview 2, we've shipped a...

Out-of-Process Debugger for C++ in Visual Studio 2019
Dec 18, 2018
Post comments count 0
Post likes count 0

Out-of-Process Debugger for C++ in Visual Studio 2019

Cagri Aslan
Cagri Aslan

Visual Studio 2019 Preview 1 introduces an improved debugger for C++ that uses an external 64-bit process for hosting its memory-intensive components. If you’ve experienced memory-related issues while debugging C++ applications before, these issues should now be largely resolved with Visual Studio 2019. Background One of the areas of feedback for the debugger in Visual Studio has been around its high memory usage during debugging of large and complex C++ applications. Most of the memory consumption in this scenario is due to the large amounts of symbol information that the debugger needs to load to show program...

New Start Window and New Project Dialog Experience in Visual Studio 2019
Dec 14, 2018
Post comments count 14
Post likes count 0

New Start Window and New Project Dialog Experience in Visual Studio 2019

Augustin Popa
Augustin Popa

Two features available in Visual Studio 2019 Preview 1 for C++ developers are the start window and a revamped new project dialog. The start window moves the core features from the Visual Studio Start Page, which normally appeared in the editor space when Visual Studio is launched, out into a separate window that appears before the IDE launches. The window includes five main sections: Open recent, Clone or checkout code, Open a project or solution, Open a local folder, Create a new project. It is also possible to continue past the window without opening any code by choosing “Continue without code”. Let’s dig into ...

Using multi-stage containers for C++ development
Dec 13, 2018
Post comments count 0
Post likes count 0

Using multi-stage containers for C++ development

Marc Goodner
Marc Goodner

Updated January 10, 2020: Corrected link to article source that was broken by refactoring in the repo. Containers are a great tool for configuring reproducible build environments. It’s fairly easy to find Dockerfiles that provide various C++ environments. Unfortunately, it is hard to find guidance on how to use newer techniques like multi-stage builds. This post will show you how you can leverage the capabilities of multi-stage containers for your C++ development. This is relevant to anyone doing C++ development regardless what tools you are using. Multi-stage builds are Dockerfiles that use multiple FROM s...

Guaranteed Copy Elision Does Not Elide Copies
Dec 11, 2018
Post comments count 0
Post likes count 1

Guaranteed Copy Elision Does Not Elide Copies

Sy Brand
Sy Brand

This post is also available on Sy Brand's blog C++17 merged in a paper called Guaranteed copy elision through simplified value categories. The changes mandate that no copies or moves take place in some situations where they were previously allowed, e.g.: You can see this behavior in compiler versions Visual Studio 2017 15.6, Clang 4, GCC 7, and above. Despite the name of the paper and what you might read on the Internet, the new rules do not guarantee copy elision. Instead, the new value category rules are defined such that no copy exists in the first place. Understanding this nuance gives a deeper under...

Visual Studio Code C++ extension: October 2018 update and a simplified Insiders program
Dec 5, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C++ extension: October 2018 update and a simplified Insiders program

Marian Luparu
Marian Luparu

The October 2018 update of the Visual Studio Code C++ extension has recently shipped. It comes with a ton of bug fixes, improved Go to Definition support, integrated terminal support when debugging, and a simpler way to opt into our extension’s Insiders program. For a detailed list of this release’s improvements, check out the release notes. Go to Definition improvements Go to Definition takes advantage now of the full semantic information coming from the C++ IntelliSense engine. When C++ IntelliSense is enabled (which is the default, and as long as the fallback to Tag Parser does not kick in), you will see imp...

AI-Assisted Code Completion Suggestions Come to C++ via IntelliCode
Dec 5, 2018
Post comments count 1
Post likes count 0

AI-Assisted Code Completion Suggestions Come to C++ via IntelliCode

Nick Uhlenhuth
Nick Uhlenhuth

After reading and writing enough code, you begin to notice certain usage patterns. For example, if a stream is open, it will eventually be closed. More interestingly, if a string is used in the context of an if-statement, it will often be to check if the string is empty or if it has a certain size. You begin to identify and use these coding patterns over time, but what if Visual Studio already knew these common patterns and could suggest them to you as you code? That’s exactly what IntelliCode does.  IntelliCode uses machine learning to train over thousands of real-world projects including open-source projects...

Announcing Live Share for C++: Real-Time Sharing and Collaboration
Dec 4, 2018
Post comments count 1
Post likes count 0

Announcing Live Share for C++: Real-Time Sharing and Collaboration

Nick Uhlenhuth
Nick Uhlenhuth

C++ developers using Visual Studio 2019 16.0 Preview 1 or Visual Studio Code can now use Live Share. With Live Share you can share the full context of your code, enabling collaborative editing and debugging.  Collaborative Editing:   Collaborative Debugging:    In a Live Share session there is a host and a guest(s). The host of the session provides the guest with everything it needs to be productive; the guest doesn’t need any of the source files locally. Furthermore, the guest doesn’t need the right compiler, external dependencies, or even the same installed components. The guest even gets IntelliSense fr...

Better template support and error detection in C++ Modules with MSVC 2017 version 15.9
Nov 27, 2018
Post comments count 0
Post likes count 0

Better template support and error detection in C++ Modules with MSVC 2017 version 15.9

Cameron DaCamara
Cameron DaCamara

Overview It has been a long time since we last talked about C++ Modules. We feel it is time to revisit what has been happening under the hood of MSVC for modules. The Visual C++ Team has been dedicated to pushing conformance to the standard with a focus on making the overall compiler implementation more robust and correct with the rejuvenation effort. This rejuvenation effort has given us the ability to substantially improve our modules implementation. We've mostly done this work transparently over the past few months until now. We are proud to say the work has reached a point where talking about it would hop...

Exploring Clang Tooling – Using Build Tools with clang-tidy
Nov 27, 2018
Post comments count 0
Post likes count 0

Exploring Clang Tooling – Using Build Tools with clang-tidy

Stephen Kelly
Stephen Kelly

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, who is a developer at Havok, a contributor to Qt and CMake and a blogger. This post is part of a series where he is sharing his experience using Clang tooling in his current team. The previous series about clang-tidy on this blog covered the basics of creating a clang-tidy ...

Using Visual Studio for Cross Platform C++ Development Targeting Windows and Linux
Nov 26, 2018
Post comments count 5
Post likes count 0

Using Visual Studio for Cross Platform C++ Development Targeting Windows and Linux

Marc Goodner
Marc Goodner

A great strength of C++ is the ability to target multiple platforms without sacrificing performance. If you are using the same codebase for multiple targets, then CMake is the most common solution for building your software. You can use Visual Studio for your C++ cross platform development when using CMake without needing to create or generate Visual Studio projects. Just open the folder with your sources in Visual Studio (File > Open Folder). Visual Studio will recognize CMake is being used, then use metadata CMake produces to configure IntelliSense and builds automatically. You can quickly be editing, buildi...

Q&A: Fine-grained friendship
Nov 20, 2018
Post comments count 0
Post likes count 0

Q&A: Fine-grained friendship

Herb Sutter
Herb Sutter

This post is part of a regular series of posts where the C++ product team here at Microsoft answers questions we have received from customers. The questions can be about anything C++ related: Visual C++, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's Q&A is by Herb Sutter. Question Reader @thesamhughescom recently asked: Has there ever been a consideration for allowing individual private functions to whitelist other classes or functions to call them? Similar to the per class friend method, I was thinking you could annotate a function with or just an ide...

Use the official range-v3 with MSVC 2017 version 15.9
Nov 7, 2018
Post comments count 1
Post likes count 0

Use the official range-v3 with MSVC 2017 version 15.9

Casey Carter
Casey Carter

We’re happy to announce that the ongoing conformance work in the MSVC compiler has reached a new milestone: support for Eric Niebler’s range-v3 library. It’s no longer necessary to use the range-v3-vs2015 fork that was introduced for MSVC 2015 Update 3 support; true upstream range-v3 is now usable directly with MSVC 2017. The last push to achieve range-v3 support involved Microsoft-sponsored changes in both the MSVC compiler and range-v3. The compiler changes involved fixing about 60 historically blocking bugs, of which 30+ were alias template bugs in /permissive- mode. Changes to range-v3 were to add support...

Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy
Nov 6, 2018
Post comments count 1
Post likes count 0

Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy

Stephen Kelly
Stephen Kelly

In the previous post in this series, we used clang-query to examine the Abstract Syntax Tree of a simple source code file. Using clang-query, we can prototype an AST Matcher which we can use in a clang-tidy check to refactor code in bulk. This time, we will complete the rewriting of the source code. Let's return to MyFirstCheck.cpp we generated earlier and update the registerMatchers method. First we can refactor it to port both function declarations and function calls, using the callExpr() and callee() matchers we used in the previous post: Because Matchers are really C++ code, we can extract them i...

Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query
Oct 23, 2018
Post comments count 0
Post likes count 1

Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query

Stephen Kelly
Stephen Kelly

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, who is a developer at Havok, a contributor to Qt and CMake and a blogger. This post is part of a series where he is sharing his experience using Clang tooling in his current team. In the last post, we created a new clang-tidy check following documented steps and encountered...

Exploring Clang Tooling Part 1: Extending Clang-Tidy
Oct 19, 2018
Post comments count 0
Post likes count 1

Exploring Clang Tooling Part 1: Extending Clang-Tidy

Stephen Kelly
Stephen Kelly

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, who is a developer at Havok, a contributor to Qt and CMake and a blogger. This post is part of a series where he is sharing his experience using Clang tooling in his current team. This post is part of a three-part series about using the Clang AST Matchers to mechanically re...

Standard Library Algorithms: Changes and Additions in C++17
Oct 16, 2018
Post comments count 0
Post likes count 0

Standard Library Algorithms: Changes and Additions in C++17

Visual CPP Team
Visual CPP Team

Today we have a guest post from Marc Gregoire, Software Architect at Nikon Metrology and Microsoft MVP since 2007.   The C++14 standard already contains a wealth of different kinds of algorithms. C++17 adds a couple more algorithms and updates some existing ones. This article explains what’s new and what has changed in the C++17 Standard Library. New Algorithms Sampling C++17 includes the following new sampling algorithm: It uses the given random number generator () to pick random elements from a given range [, ) and writes them to the given output iterator (). Here is a simple piece of c...

How to Use Class Template Argument Deduction
Oct 11, 2018
Post comments count 0
Post likes count 0

How to Use Class Template Argument Deduction

Stephan T. Lavavej - MSFT
Stephan T. Lavavej - MSFT

Class Template Argument Deduction (CTAD) is a C++17 Core Language feature that reduces code verbosity. C++17's Standard Library also supports CTAD, so after upgrading your toolset, you can take advantage of this new feature when using STL types like std::pair and std::vector. Class templates in other libraries and your own code will partially benefit from CTAD automatically, but sometimes they'll need a bit of new code (deduction guides) to fully benefit. Fortunately, both using CTAD and providing deduction guides is pretty easy, despite template metaprogramming's fearsome reputation! CTAD support is availab...

std::any: How, when, and why
Oct 4, 2018
Post comments count 3
Post likes count 0

std::any: How, when, and why

Casey Carter
Casey Carter

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by Casey Carter. C++17 adds several new "vocabulary types" - types intended to be used in the interfaces between components from different sources - to the standard library. MSVC has been shipping implementations of , , and since the Visual Studio 2017 release, but we haven't provided any ...

CUDA 10 is now available, with support for the latest Visual Studio 2017 versions
Oct 1, 2018
Post comments count 0
Post likes count 0

CUDA 10 is now available, with support for the latest Visual Studio 2017 versions

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

We are pleased to echo NVIDIA announcement for CUDA 10 today, and particularly excited about CUDA 10.0's Visual Studio compatibility. CUDA 10.0 will work with all the past and future updates of Visual Studio 2017. To stay committed to our promise for a Pain-free upgrade to any version of Visual Studio 2017, we partnered closely with NVIDIA for the past few months to make sure CUDA users can easily migrate between Visual Studio versions. Congratulations to NVIDIA for this milestone and thank you for a great collaboration! A Bit of Background In various updates of Visual Studio 2017 (e.g. 15.5) and even earlier m...

Step Back – Going Back in C++ Time
Sep 26, 2018
Post comments count 0
Post likes count 0

Step Back – Going Back in C++ Time

Andy Sterland
Andy Sterland

Step Back for C++ In the most recent, 15.9, update to Visual Studio 2017 Enterprise Edition, we’ve added “Step Back” for C++ developers targeting Windows 10 Anniversary Update (1607) and later. With this feature, you can now return to a previous state while debugging without having to restart the entire process. It’s installed as part of the C++ workload but set to “off” by default. To enable it, go to Tools -> Options -> IntelliTrace and select the “IntelliTrace snapshots” option. This will enable snapshots for both Managed and Native code. Once “Step Back” is enabled, you will see snapshots appear...

Books on C++17
Sep 25, 2018
Post comments count 0
Post likes count 1

Books on C++17

Marian Luparu
Marian Luparu

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by Marian Luparu. C++17 is an important evolution of the C++ language, and you may be wondering how you should get started learning about it. On our blog, you will always find the latest announcements related to our team’s work on C++17 and future standards and, as part of this new series,...

Chat with the Visual C++ Team at CppCon 2018
Sep 19, 2018
Post comments count 0
Post likes count 0

Chat with the Visual C++ Team at CppCon 2018

Nick Uhlenhuth
Nick Uhlenhuth

We are super excited to be returning to CppCon in Bellevue this year! We will have a table Monday – Friday where you can meet us and talk with us about Visual Studio, Visual Studio Code, and vcpkg. Additionally, we'd like to invite to you several sessions that folks from our team will be presenting this year: Monday, September 24th 14:00 – 15:00 How to Write Well-Behaved Value Wrappers by Sy Brand 15:15 – 16:15 How C++ Debuggers Work by Sy Brand Tuesday, September 25th 14:00 – 15:00 What Could Possibly Go Wrong?: A Tale of Expectations and Exceptions by Sy Brand and Phil Nash 15:15 – 15:45 Overl...

STL Features and Fixes in VS 2017 15.8
Sep 18, 2018
Post comments count 0
Post likes count 0

STL Features and Fixes in VS 2017 15.8

Billy O'Neal
Billy O'Neal

15.7 was our first feature complete C++17 library (except floating-point <charconv>), and in 15.8 we have addressed large numbers of outstanding bugs. As usual, we’ve maintained a detailed list of the STL fixes that are available. Visual Studio 2017 15.8 is available at https://visualstudio.microsoft.com/vs/. New Features We aren't actually driver developers ourselves and are interested in feedback in this area if there are things we can do to make these more usable in constrained environments. Correctness Fixes Performance and Throughp...

Parallel Custom Build Tools in Visual Studio 2017
Sep 18, 2018
Post comments count 0
Post likes count 0

Parallel Custom Build Tools in Visual Studio 2017

olgaark
olgaark

Many projects need to use additional tools during their build to generate sources for further compilation or perform other custom build tasks. VC projects have always supported Custom Build Tool integration, but it had some limitations. One of the popular requests on UserVoice is Allow custom build tools to run in parallel. Another problem is that often custom build outputs need to be passed to other build tools (for instance, some tools can generate C/C++ sources, which need to be passed to the compiler) and there was no easy way to specify that. To solve these problems, we added support for parallel executio...

Exploring Clang Tooling, Part 0: Building Your Code with Clang
Sep 18, 2018
Post comments count 0
Post likes count 2

Exploring Clang Tooling, Part 0: Building Your Code with Clang

Stephen Kelly
Stephen Kelly

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, who is a developer at Havok, a contributor to Qt and CMake and a blogger. This is the first post in a series where he is sharing his experience using Clang tooling in his current team. Conformance and Compatibility During the long development of C++ compilers so far, a few ...

Using C++17 Parallel Algorithms for Better Performance
Sep 11, 2018
Post comments count 7
Post likes count 2

Using C++17 Parallel Algorithms for Better Performance

Billy O'Neal
Billy O'Neal

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by Billy O'Neal. C++17 added support for parallel algorithms to the standard library, to help programs take advantage of parallel execution for improved performance. MSVC first added experimental support for some algorithms in 15.5, and the experimental tag was removed in 15.7. The inte...

std::optional: How, when, and why
Sep 4, 2018
Post comments count 0
Post likes count 6

std::optional: How, when, and why

Casey Carter
Casey Carter

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by Casey Carter. C++17 adds several new "vocabulary types" – types intended to be used in the interfaces between components from different sources – to the standard library. MSVC has been shipping implementations of , , and  since the Visual Studio 2017 release, but we haven't provided any...

Use the official Boost.Hana with MSVC 2017 Update 8 compiler
Aug 30, 2018
Post comments count 0
Post likes count 0

Use the official Boost.Hana with MSVC 2017 Update 8 compiler

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

We would like to share a progress update to our previous announcement regarding enabling Boost.Hana with MSVC compiler. Just as a quick background, Louis Dionne, the Boost.Hana author, and us have jointly agreed to provide a version of Boost.Hana in vcpkg to promote usage of the library among more C++ users from the Visual C++ community. We've identified a set of blocking bugs and workarounds and called them out in our previous blog, and stated that as we fix the remaining bugs, we will gradually update the version of Boost.Hana in vcpkg, ultimately removing it and replacing it with master repo. We can conduct th...

Q&A: How to specialize std::sort by binding the comparison function
Aug 29, 2018
Post comments count 0
Post likes count 0

Q&A: How to specialize std::sort by binding the comparison function

Herb Sutter
Herb Sutter

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: Visual C++, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's Q&A is by Herb Sutter. Question A reader recently asked: I am trying to specialize std::sort by binding the comparison function. I first tried: It couldn’t infer the parameter types. So then I tried: Is there a straightforward way to do this? Another example: Here bind has no trouble d...

Visual Studio Code C/C++ extension August 2018 Update
Aug 23, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension August 2018 Update

Rong Lu
Rong Lu

Late last week we shipped the August 2018 update  to the C/C++ extension for Visual Studio Code. This update included support for “Just My Code” symbol search, a gcc-x64 option in the intelliSenseMode setting, and many bug fixes. You can find the full list of changes in the release notes. “Just My Code” symbol search Keyboard shortcut Ctrl+T in Visual Studio Code lets you jump to any symbols in the entire workspace. We have heard feedback that sometimes it is desired to have the system header symbols excluded from this search. In this update, we enabled “Just My Code” symbol search to filter out system symbol...

std::string_view: The Duct Tape of String Types
Aug 21, 2018
Post comments count 1
Post likes count 0

std::string_view: The Duct Tape of String Types

Billy O'Neal
Billy O'Neal

Visual Studio 2017 contains support for std::string_view, a type added in C++17 to serve some of the roles previously served by const char * and const std::string& parameters. string_view is neither a "better const std::string&", nor "better const char *"; it is neither a superset or subset of either. std::string_view is intended to be a kind of universal "glue" -- a type describing the minimum common interface necessary to read string data. It doesn't require that the data be null-terminated, and doesn't place any restrictions on the data's lifetime. This gives you type erasure for "free", as a function ...

C++ development with Docker containers in Visual Studio Code
Aug 14, 2018
Post comments count 0
Post likes count 0

C++ development with Docker containers in Visual Studio Code

Rong Lu
Rong Lu

Containers allow developers to package up an application with all the parts it needs, such as libraries and other dependencies, and ship it all out as one image. This is especially useful for C++ cross-platform development – with containers you can choose to target a platform that runs on a completely different operating system than your developer machine. And even if they are running on the same OS, the container technology ensures that the application will run on any other machines regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the c...

Using MSVC in a Docker Container for Your C++ Projects
Aug 13, 2018
Post comments count 3
Post likes count 1

Using MSVC in a Docker Container for Your C++ Projects

Marc Goodner
Marc Goodner

Containers encapsulate the runtime environment of an application: the file system, environment settings, and virtualized OS are bundled into a package. Docker containers have changed the way we think about build and test environments since they were introduced five years ago. Visual Studio’s setup and install expert, Heath Stewart, blogs regularly about how to install the Visual Studio Build Tools in a Windows Docker Container. Recently he explained why you won’t find a container image for build tools. Basically, any install that has a workload installed that you aren’t using is going to be bigger than you want....

Visual Studio Code C/C++ extension July 2018 Update and IntelliSense auto-configuration for CMake
Jul 25, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension July 2018 Update and IntelliSense auto-configuration for CMake

Rong Lu
Rong Lu

Last week we shipped the July 2018 update to the C/C++ extension for Visual Studio Code. In this update we added support for a new experimental API that allows build system extensions to pass IntelliSense configuration information to our extension for powering up full IntelliSense experience. You can find the full list of changes in the July 2018 update in the changelog. As CMake has been the most requested build system for us to provide support for, we’ve been working with vector-of-bool, author of the CMake Tools extension, on an implementation using this new API to provide IntelliSense auto-configuration for ...

Data Breakpoints – Visual Studio 2017 15.8 Update  
Jul 25, 2018
Post comments count 0
Post likes count 0

Data Breakpoints – Visual Studio 2017 15.8 Update  

Leslie Richardson
Leslie Richardson

New to Visual Studio 2017 version 15.8, you can now set data breakpoints from within the Locals, Autos, Watch, and Quickwatch windows!  To view official documentation on data breakpoints, check out this post. Data breakpoints allow you to stop execution when a particular variable stored at a specific memory address changes.  Prior to version 15.8, data breakpoints could only be set via the Breakpoints window. In this window, a data breakpoint can be set by selecting New > Data Breakpoint.. and then entering the address of the desired variable and the number of bytes you want the window to watch. Setting data ...

MSVC Preprocessor Progress towards Conformance
Jul 6, 2018
Post comments count 1
Post likes count 0

MSVC Preprocessor Progress towards Conformance

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

Why re-write the preprocessor? Recently, we published a blog post on C++ conformance completion. As mentioned in the blog post, the preprocessor in MSVC is currently getting an overhaul. We are doing this to improve its language conformance, address some of the longstanding bugs that were difficult to fix due to its design and improve its usability and diagnostics. In addition to that, there are places in the standard where the preprocessor behavior is undefined or unspecified and our traditional behavior diverged from other major compilers. In some of those cases, we want to move closer to the ecosystem to make...

Shared PCH usage sample in Visual Studio
Jul 5, 2018
Post comments count 4
Post likes count 1

Shared PCH usage sample in Visual Studio

EricMittelette
EricMittelette

This post was written by Olga Arkhipova and Xiang Fan Oftentimes, multiple projects in a Visual Studio solution use the same (or very similar) precompiled headers. As pch files are often big and building them takes a significant amount of time, this leads to the popular question: is it possible for several projects to use the same pch file which would be built just once? The answer is yes, but it requires a couple of tricks to satisfy cl’s check that command line used for building the pch is the same as the command line used for building a source file using this pch. Here is a sample solution, which has ...

Support for Unity (Jumbo) Files in Visual Studio 2017 15.8 (Experimental)
Jul 2, 2018
Post comments count 0
Post likes count 1

Support for Unity (Jumbo) Files in Visual Studio 2017 15.8 (Experimental)

Will Buik
Will Buik

This post was written by Olga Arkhipova. Many big codebases use so-called unity (jumbo) builds where many source files are included in one or a few ‘unity’ files for compilation, which makes compiling and linking much faster. Just to avoid any confusion – this blog is NOT related to the Unity game engine. Looking at some customer feedback regarding slow IntelliSense, we found that projects often include both source files and unity files including those source files. Currently there is no easy way to exclude source files from the build and unity files from the IntelliSense parsing, so we do quite a lot of unnec...

Announcing C++ Just My Code Stepping in Visual Studio
Jun 29, 2018
Post comments count 1
Post likes count 0

Announcing C++ Just My Code Stepping in Visual Studio

Marian Luparu
Marian Luparu

In Visual Studio 2017 release 15.8 Preview 3 we’re announcing support for Just My Code stepping for C++. In addition to previously supported callstack filtering, the Visual Studio debugger now also supports stepping over non-user-code. As you “Step In”, for example in an algorithm from the Standard library with a custom predicate or in a Win32 API that has a user callback, the debugger will conveniently step into the predicate or callback you provided rather than the library code that will eventually call your code. After the very warm reception of our debugging improvements in stepping in std::function calls an...

CMake Support in Visual Studio – Configuration Templates
Jun 27, 2018
Post comments count 0
Post likes count 0

CMake Support in Visual Studio – Configuration Templates

Will Buik
Will Buik

Visual Studio 2017 15.8 Preview 3 is now available and it includes several improvements to the CMake tools. In addition to a few fixes we have simplified the way you can configure your CMakeSettings.json file by adding configuration templates. If you are new to CMake in Visual Studio, check out how to get started. Configuration Templates for CMake If you have created a CMakeSettings.json file to customize your project’s settings in the past you might know that that file could be a little daunting. With both the Desktop and Linux workloads installed, the default CMakeSettings.json template was over 100 lines long...

New, experimental code analysis features in Visual Studio 2017 15.8 Preview 3
Jun 26, 2018
Post comments count 0
Post likes count 0

New, experimental code analysis features in Visual Studio 2017 15.8 Preview 3

eli fessler
eli fessler

The Visual C++ team has been working to refresh our code analysis experience inside Visual Studio. We’re aiming to make these tools both more useful and natural to use and hope that they’ll benefit you no matter your workflow, style, or project type. Trying out new features In Visual Studio 2017 version 15.8 Preview 3, available in the Preview channel, we’ve introduced some new, in-progress code analysis features. These features are disabled by default, but you may enable them under Tools > Options > Text Editor > C++ > Experimental > Code Analysis. We encourage you to test them out and provide any...

Convert Macros to Constexpr
Jun 26, 2018
Post comments count 0
Post likes count 1

Convert Macros to Constexpr

Augustin Popa
Augustin Popa

Visual Studio 2017 version 15.8 is currently available in preview. Today, Preview 3 has been released, and it comes with several features that improve the developer productivity experience. One key theme in 15.8 is code modernization, and macros are a key target for that. In 15.8 Preview 1, we announced the ability to expand macros in Quick Info tooltips, and now, for Preview 3, we are happy to announce a way to convert them to modern C++ constexpr expressions. The new preview includes a quick fix, accessible from the editor window, that identifies macros that can be converted to constexpr, and offers the option ...

Announcing Template IntelliSense
Jun 26, 2018
Post comments count 0
Post likes count 0

Announcing Template IntelliSense

Nick Uhlenhuth
Nick Uhlenhuth

C++ developers using function templates and class templates can now take full advantage of IntelliSense within their template bodies. In Visual Studio 2017 15.8 Preview 3, when your caret is inside a template, a new UI element called a “Template Bar” appears next to the template definition. The Template Bar allows you to provide sample template arguments for IntelliSense.  For example, let’s look in the Boost library at the function template is_partitioned_until inside of algorithm.hpp (which I slightly modified for this demo). We can use the Template Bar to give IntelliSense an example of the InputIterator type...

Visual Studio Code C/C++ extension June 2018 Update
Jun 21, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension June 2018 Update

Rong Lu
Rong Lu

Visual Studio Code C/C++ extension June 2018 Update Today we’re very happy to announce the availability of the June 2018 update to the C/C++ extension for Visual Studio Code! In this update, we are continuing our efforts to make IntelliSense configuration easier by auto-detecting compile_commands.json files for IntelliSense, significantly improving recursive search performance, making browse.path optional, and adding “compilerPath” support for MSVC. IntelliSense auto-detects compile_commands.json In this update, compile_commands.json files in the workspace will be detected to auto-configure IntelliSense, eliminat...

Spring 2018 Visual C++ Migration Survey
Jun 7, 2018
Post comments count 0
Post likes count 0

Spring 2018 Visual C++ Migration Survey

EricMittelette
EricMittelette

The Spring 2018 Visual C++ Migration Survey is now open. Please take a few minutes to share your experiences, positive or not so positive. If you have not migrated your solutions and project to Visual Studio 2017, please let us know why. This survey is a way for us to better understand your migration issues  , your needs and provide the features  you need. Share your candid feedback now! Thank you.  

Use Boost.Hana via vcpkg with the latest MSVC compiler
Jun 4, 2018
Post comments count 0
Post likes count 0

Use Boost.Hana via vcpkg with the latest MSVC compiler

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

Overview As we continue to work towards improving the conformance of the MSVC compiler for the C++ community, we would like to enable more C++ libraries, and today we are bringing Boost.Hana to Visual C++.  Building on our recent C++ conformance progress, customers can now use Boost.Hana with the VS2017 15.7 update after we've applied some source workarounds in the vcpkg version. We want to thank the author of Boost.Hana, Louis Dionne, for working with us on this effort and for extending his support. How do I get it? Background You may have seen our VCBlog post about C++ conformance completion ...

Visual Studio Code C/C++ extension May 2018 Update – IntelliSense configuration just got so much easier!
May 8, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension May 2018 Update – IntelliSense configuration just got so much easier!

Rong Lu
Rong Lu

Visual Studio Code C/C++ extension May 2018 Update – IntelliSense configuration just got so much easier! This morning we shipped the May 2018 update of the C/C++ extension for Visual Studio Code, the most significant update to this extension in its 2-year history! 😊 The team has been working extremely hard for the past month to bring many new features into this release. We are super excited about it and hope you would like it too! In this update, we primarily focused on drastically reducing the amount of configuration you have do to gain a great IntelliSense experience, and also added a few other features to boo...

Macro Expansions in Quick Info Tooltips
May 7, 2018
Post comments count 1
Post likes count 0

Macro Expansions in Quick Info Tooltips

Augustin Popa
Augustin Popa

With Visual Studio, we're always looking for ways to save developers time and make them more productive. A good way to do this is to look at C/C++ language features that are difficult to work with, and make it easier to understand them. Today, we're looking at macros. Macros are always a pain to deal with, yet they are one of those things that never seem to go away in C++. To make it easier to understand what a particular macro is doing, we are introducing a new feature: macro expansions in Quick Info tooltips. If you are already using Visual Studio, you may already know that you can hover over a code symbol (suc...

Recently completed UserVoice Suggestions for Visual Studio
May 7, 2018
Post comments count 0
Post likes count 0

Recently completed UserVoice Suggestions for Visual Studio

eli fessler
eli fessler

In our blog posts on the Visual C++ Team Blog, we often encourage readers to submit suggestions on how to improve Visual Studio via UserVoice. We review these suggestions regularly and often work to incorporate them into future releases. This post aims to provide an update, expanding on our previous entry on completed UserVoice suggestions, and to let you know which suggestions we’ve recently marked as Complete. The following list contains 22 completed suggestions, totaling 892 votes! If you voted for or suggested any of these items, your votes ...

Announcing: MSVC Conforms to the C++ Standard
May 7, 2018
Post comments count 1
Post likes count 0

Announcing: MSVC Conforms to the C++ Standard

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

Achieving conformance with the C++ Standards has been a long road for the Visual C++ team. If you've seen us at any conferences lately, you've probably seen the MSVC Conformance slide. (You can grab a copy of the slide or watch the 2017 CppCon talk here.) Finishing the features on this slide – which includes features from C++11, C++14, and C++17 – has been one of our team's main goals for the past few years. We're happy to announce that in Visual Studio 2017 version 15.7 we've implemented these features. (The Technical Specifications are work-in-progress as they make their ways into the Standard.) The MSVC com...

CMake Support in Visual Studio – Code Analysis and CMake 3.11
May 2, 2018
Post comments count 0
Post likes count 0

CMake Support in Visual Studio – Code Analysis and CMake 3.11

Will Buik
Will Buik

Visual Studio 2017 15.7 Preview 4 is now available and we have added a few more CMake features in addition to the Targets View and single file compilation added in Preview 3.  We keep the version of CMake that ships with Visual Studio as fresh as possible, so we have updated it to version 3.11.  We are also excited to announce that CMake projects now support the IDE’s code analysis features that previously required a VCXProj to take advantage of. Please download the preview and check out the latest CMake features such as the Targets View, single file compilation, and more control over when projects are configure...

Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg
Apr 24, 2018
Post comments count 0
Post likes count 0

Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg

EricMittelette
EricMittelette

At Microsoft, the core of our vision is “Any Developer, Any App, Any Platform” and we are committed to bringing you the most productive development tools and services to build your apps across all platforms. With this in mind, we are thrilled to announce today the availability of vcpkg on Linux and MacOS. This gives you immediate access to the vcpkg catalog of C++ libraries on two new platforms, with the same simple steps you are familiar with on Windows and UWP today. Vcpkg has come a long way since its launch at CppCon 2016. Starting from only 20 libraries, we have seen an incredible growth in the last 19 mont...

Spectre diagnostic in Visual Studio 2017 Version 15.7 Preview 4
Apr 20, 2018
Post comments count 0
Post likes count 0

Spectre diagnostic in Visual Studio 2017 Version 15.7 Preview 4

Andrew Pardoe
Andrew Pardoe

Visual Studio 2017 version 15.7 Preview 4 adds a new capability to our Spectre mitigation: the ability to see where the compiler would have inserted a mitigation and what data led to that action. A new warning, C5045, lets you see what patterns in your code would have caused a mitigation, such as an LFENCE, to be inserted. This change builds upon our existing Spectre mitigation support, including the changes introduced in Preview 3. Complete details about are available in context in the original MSVC Spectre mitigation post on VCBlog. The new warning is also discussed below. Enabling C5045 The C5045 warning ...

IntelliSense for Remote Linux Headers
Apr 9, 2018
Post comments count 1
Post likes count 0

IntelliSense for Remote Linux Headers

Marc Goodner
Marc Goodner

In Visual Studio 2017 15.7 Preview 3 we are introducing IntelliSense for headers on remote Linux connections. This is part of the Linux development with C++ workload that you can choose in the Visual Studio installer. If you are just getting started with the C++ Linux support in Visual Studio you can read our C++ Linux tutorial at aka.ms/vslinux. When you add a new connection in the Connection Manager we will automatically determine the include directories for the compiler on the system. Those directories will be zipped up and copied to a directory on your local Windows machine. Then, when you use that connectio...

Announcing CodeLens for C++ Unit Testing
Apr 9, 2018
Post comments count 0
Post likes count 0

Announcing CodeLens for C++ Unit Testing

Nick Uhlenhuth
Nick Uhlenhuth

If you are just getting started with unit testing in C++, visit our testing startup guide. C++ developers in Visual Studio can now get their first taste of CodeLens! Specifically, Visual Studio 2017 15.7 Preview 3 Professional and Enterprise editions offer CodeLens for Unit Testing. There are a few ways to initialize CodeLens: After performing any of the above actions, CodeLens will appear above each of your unit tests. CodeLens allows you to Run, Debug, and view the Test Status of your unit tests directly in the source file. The test status indicators are the same as the ones in the Test Explorer (W...

CMake Support in Visual Studio – Targets View, Single File Compilation, and Cache Generation Settings
Apr 9, 2018
Post comments count 0
Post likes count 0

CMake Support in Visual Studio – Targets View, Single File Compilation, and Cache Generation Settings

Will Buik
Will Buik

Visual Studio 2017 15.7 Preview 3 is now available, which includes several improvements to the CMake tools.  The latest preview offers more control than ever over how to visualize, build, and manage your CMake projects. Please download the preview and check out the latest CMake features such as the Targets View, single file compilation, and more control over when projects are configured.  As always, we would love to hear your feedback too. If you are new to CMake in Visual Studio, check out how to get started. CMake Targets View The latest preview of Visual Studio offers a new way to visualize your CMake project...

Spectre mitigation changes in Visual Studio 2017 Version 15.7 Preview 3
Apr 9, 2018
Post comments count 0
Post likes count 0

Spectre mitigation changes in Visual Studio 2017 Version 15.7 Preview 3

Andrew Pardoe
Andrew Pardoe

With Visual Studio 2017 version 15.7 Preview 3 we have two new features to announce with regards to our Spectre mitigations. First, the /Qspectre switch is now supported regardless of the selected optimization level. Second, we have provided Spectre-mitigated implementations of the Microsoft Visual C++ libraries. Complete details are available in context in the original MSVC Spectre mitigation post on VCBlog. Changes in Update 3 are also listed below. In previous versions of MSVC we only added Spectre mitigations when code is being optimized. In Visual Studio 2017 version 15.7 Preview 3 we've added support for ...

C++ code analysis: configure rules from the command line
Apr 9, 2018
Post comments count 0
Post likes count 0

C++ code analysis: configure rules from the command line

Andrew Pardoe
Andrew Pardoe

This post written by Sunny Chatterjee and Andrew Pardoe Visual Studio version 15.7 Preview 3 introduces a new MSVC compiler switch, , that configures code analysis runs. The primary motivation for this switch is to enable developers who are using C++ Code Analysis without using MSBuild to filter rules. But developers who are using code analysis with MSBuild also benefit from this switch: code analysis runs are faster, increasing your compilation throughput. What are code analysis rulesets? Code analysis rulesets allow you to choose what code analysis results you see when you analyze your code. Code analysis rule...

MSVC now correctly reports __cplusplus
Apr 9, 2018
Post comments count 3
Post likes count 0

MSVC now correctly reports __cplusplus

Andrew Pardoe
Andrew Pardoe

The MSVC compiler’s definition of the predefined macro leaps ahead 20 years in Visual Studio 2017 version 15.7 Preview 3. This macro has stubbornly remained at the value "199711L", indicating (erroneously!) that the compiler conformed to the C++98 Standard. Now that our conformance catch-up work is drawing to a close we’re updating the macro to reflect the true state of our implementation. The value of the macro doesn’t imply that we no longer have any conformance bugs. It’s just that the new value is much more accurate than always reporting "199711L". /Zc:__cplusplus You need to compile with the switch to ...

Visual Studio Code C/C++ extension March 2018 update
Mar 29, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension March 2018 update

Rong Lu
Rong Lu

Today we are excited to announce the March 2018 update to the Visual Studio Code C/C++ extension! This update includes improved auto-complete for local and global scopes and a simplified configuration process for system includes and defines, enabling a better out-of-box IntelliSense experience. You can find the full list of changes in the release notes. We’d like to thank everyone who tried our Insiders builds earlier this month and sent us feedback! Fixes for the issues you reported and feature suggestions you told us about helped shape the final release the way it is today 😊. If you are not yet an insider but ...

Configuring C++ IntelliSense and Browsing
Mar 27, 2018
Post comments count 0
Post likes count 0

Configuring C++ IntelliSense and Browsing

Oleg Kharitonov
Oleg Kharitonov

Whether you are creating a new (or modifying an existing) C++ project using a Wizard, or importing an project into Visual Studio from another IDE, it’s important to configure the project correctly for the IntelliSense and Browsing features to provide accurate information.  This article provides some tips on configuring the projects and describes a few ways that you can investigate configuration problems. Include Paths and Preprocessor Macros The two settings that have the greatest effect on the accuracy of IntelliSense and Browsing operations are the Include Paths and the Preprocessor macros.  This is especially ...

C++ Core Checks in Visual Studio 2017 15.7 Preview 2
Mar 22, 2018
Post comments count 0
Post likes count 0

C++ Core Checks in Visual Studio 2017 15.7 Preview 2

Sunny Chatterjee
Sunny Chatterjee

This post was written by Sergiy Oryekhov. The C++ Core Guidelines Check extension received several new rules in Visual Studio 2017 15.7 Preview 2. The primary focus in this iteration was on the checks that would make it easier to adopt utilities from the Guidelines Support Library. Below is a quick summary of these additions. For more detailed information please see documentation on MSDN: C++ Core Guidelines Checker Reference. If you're just getting started with native code analysis tools, take a look at our introductory Quick Start: Code Analysis for C/C++. New rule sets There is one new rule category added in...

Build Time Improvement Recommendation: Turn off /MAP, use PDBs
Mar 14, 2018
Post comments count 0
Post likes count 0

Build Time Improvement Recommendation: Turn off /MAP, use PDBs

YongKang Zhu [MSFT]
YongKang Zhu [MSFT]

点这里看中文版 Map file is a plaintext file that contains information about where certain names and symbols exist in a binary produced by the linker. It also contain detailed information on all sections in your binary (code, data, etc.) and which OBJ/LIB each symbol is defined in. The Windows debuggers (like windbg.exe) can use map files to help locate where a program crashed based on a crash address. Map files are an old technology: with modern releases of the MSVC toolset, PDB (Program Database) files do everything map files do and more. Producing a map file takes a long time. If you see the linker switch /MAP in yo...

ClangFormat Support in Visual Studio 2017
Mar 13, 2018
Post comments count 10
Post likes count 0

ClangFormat Support in Visual Studio 2017

Augustin Popa
Augustin Popa

Visual Studio 2017 15.7 Preview 1 comes with built-in ClangFormat support for C++ developers. Specifically, we ship version 5.0 of the clang-format.exe. ClangFormat is a utility that makes it easy to style and format your code based on a set of rules that can be configured in a .clang-format or _clang-format file. This file should be present in your source code directory tree, and applies formatting conventions to all code files at the same level or in any sub-folders. It is easily shareable via source control, so you can enforce coding conventions across your whole development team. Note that Visual Studio al...

C++ Code Analysis Improvements for Visual Studio 2017 15.7 Preview 1
Mar 13, 2018
Post comments count 0
Post likes count 0

C++ Code Analysis Improvements for Visual Studio 2017 15.7 Preview 1

Kyle Reed
Kyle Reed

点这里看中文版 We're making it easier to configure and use the C++ code analysis features with a set of changes targeting 15.7. In the first 15.7 preview we've cleaned up the UI, fixed our documentation links and, most importantly, simplified the way analysis extensions are configured.  If you're not familiar with C++ Core Check, it's a code analysis extension that helps you update your code to be safer and use a more modern style as outlined in the C++ Core Guidelines. You can learn more about the rules we enforce on our reference page. C++ Core Check Extension on by Default We wanted to make it easier for developers ...

Linux C++ Workload improvements to the Project System, Linux Console Window, rsync and Attach to Process
Mar 13, 2018
Post comments count 0
Post likes count 0

Linux C++ Workload improvements to the Project System, Linux Console Window, rsync and Attach to Process

Marc Goodner
Marc Goodner

点这里看中文版 In Visual Studio 2017 15.7 Preview 1 we have made a number of improvements to our support to the Linux C++ workload based on your feedback. You can learn more about our Linux C++ workload in Visual Studio here. MSBuild Project System improvements We added some new properties to Linux projects on the C/C++ General properties page. Max Parallel Compilation Jobs allows you to launch additional compilation processes. The default is 1 but can be increased to improve your build throughput. Public Project Include Directories allows you to specify directories in your project you want exposed to other project...

Arithmetic overflow checks in C++ Core Check
Feb 23, 2018
Post comments count 0
Post likes count 0

Arithmetic overflow checks in C++ Core Check

Sunny Chatterjee
Sunny Chatterjee

点这里看中文版 We've improved the C++ Code Analysis toolset with every major compiler update in Visual Studio 2017. Version 15.6, now in Preview, includes a set of arithmetic overflow checks. This article discusses those checks and why you’ll want to enable them in your code. If you’re just getting started with C++ Code Analysis in Visual Studio, learn more about the overall experience in this overview blog post. Motivation As part of the C++ Code Analysis team, we work with groups across the company to identify classes of vulnerabilities that could be detected with better tooling and language support. Recently, as pa...

Visual Studio Code C/C++ extension Feb 2018 update
Feb 20, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension Feb 2018 update

Rong Lu
Rong Lu

点这里看中文版 The February 2018 update to the Visual Studio Code C/C++ extension is here! In addition to several bug fixes, this update added colorization for inactive code regions, making it easy to read C and C++ code. You can find the full list of changes in the 0.15.0 release notes. Colorization for inactive regions Inactive code regions that are controlled by conditional-compilation directives, such as #if and #ifdef, are now greyed out in the editor. Join the Insiders program If you have been using, or are interested in using, the C/C++ extension for Visual Studio Code and would like to get early access to the...

Vcpkg: introducing installation options with Feature Packages
Feb 6, 2018
Post comments count 0
Post likes count 0

Vcpkg: introducing installation options with Feature Packages

EricMittelette
EricMittelette

We are happy to announce a new feature for vcpkg in version 0.0.103: Feature Packages. Vcpkg is a package manager to help acquiring and building open source libraries on Windows; vcpkg currently offers over 600 C++ libraries available for VS2017 and VS2015. With Feature Packages you have more control over how you build a library as you can specify different options (features). Lots of open source libraries offer different options and features to select at build time. For example, you may want to build OpenCV with CUDA to utilize the GPU or build HDF5 with MSMPI to enable parallel execution. Previously you neede...