Visual Studio 2017 for C++ developers – you will love it

Here on the C++ product team at Microsoft, our mission is to make the lives of every C++ developer on the planet better. We try to do that via various avenues, including but not limited to,

  1. by enthusiastically participating with the C++ Standards committee to help the language itself be better for every C++ developer in the world,
  2. by providing the Microsoft Visual C++ (MSVC) Compiler, which we aim to be the best compiler choice on Windows for targeting Windows,
  3. by continuing to enhance the C++ extension for Visual Studio Code, which is useful to all C++ developers regardless of the platform they do their development on, and finally,
  4. by improving Visual Studio, which is the most fully-featured IDE on the planet.

It is that last investment, Visual Studio, which I wanted to focus on in this blog post. Specifically, we’ll focus on the latest release, Visual Studio 2017, which we are confident you are going to love! We have blogged previously about the value in VS2017, so this post will just be a summary pointing to older posts we wrote that are now all updated for the final RTM release. First, we’ll summarize the new installation experience, then how it is pain-free to upgrade, then the new capability to open any folder of code (including CMake-based solutions), then how Visual Studio is for everyone, and finally what is new for productivity and performance.

Faster installation and your hard disk will thank you

When you install VS2017, you’ll encounter a new screen that organizes your installation options by what we call “Workloads”, so you can pick the one(s) that you care about while ignoring the others. The workloads most relevant to C++ developers are: Universal Windows Platform development, Desktop Development with C++, Game development with C++, Mobile development with C++, and Linux development with C++.

This is exciting because it makes it easy for you to pick exactly what you want to have installed, without the bits that you don’t, e.g. no ASP.NET bits if you are not also a web developer. The obvious benefits are that you end up with less visual noise while you are using the product, less use of your disk space, and you can get everything installed faster! For example, if you only pick the Linux development with C++ workload, you can get it all installed in under 6 minutes on a typical developer machine. The Desktop Development with C++, which most Visual Studio C++ users use today, takes less than 12 minutes. It is worth mentioning that what you are seeing is not only a reorganization at the UI level, but a complete rewrite of our installer.

vc2017_installing

Pain-free upgrade

Before joining Microsoft, when I was a customer, I was always excited about a new Visual Studio version, but also apprehensive about “upgrading” my projects and dealing with a few new errors/warnings on my codebase that worked fine in the “older” Visual Studio.

If you are currently using VS2013 or older, and you initially want everything to continue working as it was, there is good news for you: just use the older compiler and libraries toolset that is already on your disk with the latest Visual Studio. If you are already using VS2015, even on a clean machine (instead of side-by-side), you’ll notice in the new VS2017 acquisition experience described in the previous section that there is an option to install just the toolset that shipped with VS2015 (rather than the whole VS2015 IDE), so that you can continue using the older toolset while enjoying the benefits of the latest VS2017 IDE!

Of course one of the many reasons you are moving to VS2017 is to use the latest toolset with build throughput improvements, faster generated code, and the standards conformance goodness of the latest compiler and libraries  so you will upgrade to the latest toolset, which by the way is binary compatible with the one that ships with VS2015. You can further take advantage of the standard version compiler switches and the permissive-  switch that help you ease into the conformance at your own pace. For any language conformance changes you encounter, you’ll find we put significant effort in making our documentation great for that eventuality.

Finally, for any open source 3rd party libraries you depend on, our new package management solution vcpkg with its growing repository of libraries has your back. And if you have adopted that already for your VS2015 projects, you’ll find they automatically work when you move to VS2017.

vc2017_props

Just point Visual Studio to your code

In the previous section, we touched on upgrading projects where the assumption was that you already have Visual Studio projects, or more accurately MSBuild-based projects. What about those of you who use other C++ build systems, such as makefiles or CMake? Until this VS release, you needed to create VS projects and add your code to that, or somehow generate a VS project from your current build system. Now, you can just “Open Folder” with any code directly in Visual Studio 2017! Depending on your build system you will automatically get some IntelliSense, navigation, building, and debugging capabilities… and you can improve those experiences by further configuring and adding information in JSON text files. For those of you who have chosen CMake, you will love the CMake-support in Visual Studio, just point VS to your CMakeLists.txt files and enjoy.

vc2017_cmake

Use Visual Studio for all your projects and target platforms

When we talk to some of you, we know you keep an older version of Visual Studio side-by-side with the latest. As we already established earlier in this post, there should be no reason for you to use the old IDE, just use the older toolset in that project with the latest Visual Studio 2017 IDE.

Some of you use VS for one project, but not for your other projects. In the past, there were many valid reasons for that, such as you didn’t want to convert your nmake-based (or other non-MSBuild-based) codebase to MSBuild; as established earlier, now you can just point Visual Studio 2017 to any folder of C++ code and work with it.

Another reason we hear is that folks use Visual Studio to target Windows, and other IDEs to target other platforms. Again, there is no need for that now. As touched on earlier when talking about workloads, from Visual Studio you can target Android and iOS and Linux. Implicit in that statement is that you should also not be thinking about Visual Studio as the IDE that only pairs with the Microsoft compiler, instead you can use any C++ compiler you want with Visual Studio.

Some of you may prefer using editors instead of IDEs, and that is fine, check out the Visual Studio Code editor. And when you need some heavy debugging, you can easily switch to Visual Studio for that purpose (by launching the EXE as a project or attaching to the running process) and then switch back to your editor of choice.

In short, if you have chosen Windows as your development environment, regardless of what platform you target or what kind of project you are working on, Visual Studio 2017 is there to support you as a C++ developer.

vc2017_workloads

Be more productive than ever

The blog post until now has been essentially about how fast and easy it is to install the product, and how many options you have for getting your codebase in Visual Studio and make sure it builds. You are now ready to do real development, and for many of you, productivity is the main reason you use Visual Studio. It saves you a lot of time during your everyday development in what we call the tight inner loop of editing, navigating and debugging code. If you are not on VS2015 yet, the amount of productivity features we added to that VS2015 release will have you drooling and VS2017 takes that even further.

Visual Studio 2017 includes enhancements to existing features and new features such as: Find All References re-designed for larger searches, Introducing Go To the successor to Navigate To, C++ IntelliSense Improvements – Predictive IntelliSense & Filtering, Bing Developer Assistant with C++ support, C++ Edit and Continue improvements, enhancements to the Memory diag tool, enhancements to debug visualizers, the new Exception Helper, Run to Click, Attach to Process Filter and Reattach, .editorconfig, and new Git features. You can also learn about more VS productivity improvements beyond just for C++ code.

Beyond that kind of productivity, the team focused on the fundamentals of performance in the IDE. When you build during the inner loop, where all you want is for the build to complete quickly after the edits you have just made, so that you can run/test/debug your code, the linker will save you time with 2x to 4x faster links with the on-by-default and improved fastlink option (and watch the ch9 video). Beyond build throughput, you’ll find that VS starts up faster, loads solutions faster (video), IntelliSense is faster and generally working in the IDE will truly feel faster.

vc2017_speedex

 

Smile and take credit

And last but not least, you helped us build this release with your suggestions and bug reports – thank you! In the last year, we have completed 37 C++ UserVoice items, fixed 417 bugs reported through Connect, and fixed an additional 352 feedback items. Please keep the reports coming, you can report any issues you have with Visual Studio by going to Help > Send Feedback > Report A Problem, and we take your comments very seriously – thank you again.

vc2017_feedback

In Closing

We hope you’ll love using this release as much as we liked producing it. As you can see there are so many new capabilities to take advantage of, and the goal of this summary blog post is to collect all the relevant links in one place for those of you that haven’t been following in the past year – the real content is behind the links, so scroll back up and get clicking folks.