How to Convince Your Management to Upgrade to Visual Studio 2017 for C# and C++ Developers
Have you tried Visual Studio 2017 at home and want to use it at work? Here are eight reasons to upgrade today that you can share with your management:
- Faster Than Ever
- Efficient Code Navigation
- Refactorings and Quick Actions
- Additions to Core Editor Functionality
- Debugging Improvements
- New and Refreshed Unit Testing Experience
- Code Style Configuration and Enforcement
- C# 7.3 and MSVC Standards Conformance
- Upgrade today!
Reason 1: Faster Than Ever
We have made (and are continuing to make) substantial improvements to solution load and startup, branch switching, and unit test discovery times. Starting from Visual Studio 2017 version 15.6, solutions load on average 35% faster than in Visual Studio 2015. In fact, .NET and C++ developers opening large solutions in Visual Studio 2017 will notice their solutions load twice as fast as they did in 2015. Say goodbye to startup delays!
We have great news about Visual Studio setup; the setup experience is faster and more lightweight than ever. Our new install experience allows you to pick and choose what you want to install–significantly reducing your install time and size, getting you up and running in Visual Studio 2017 in no time. It also installs side-by-side with previous versions of Visual Studio.
Reason 2: Efficient Code Navigation
We know you spend as much time understanding code as writing new code, so great navigation tools are paramount to your success as a developer. Here is how you can navigate effectively in Visual Studio 2017:
- Search files, types, members, and symbols in Go To All (Ctrl+T or Ctrl+,) – Use this symbolic search (with category filters and individualized commands) to jump to files and symbols in your codebase without having to go through the Solution Explorer. To filter your search results to only types, for example, use the query syntax (e.g., “t myType”), the type filter button, or the command Edit.GoToType (see under Edit > Go To). Go To All search also has support for camelCase matching so you don’t have to type as many characters to get the results you need (e.g., “mf” for “myFile.cs”).
- Group, sort, filter, and lock results in Find All References (Shift+F12) – Group your .NET and C++ reference results by document, project, definition, etc. to quickly narrow down on the results you’re looking for (whether it be identifying dead code or investigating the ramifications of a refactoring). For .NET development, view colorized symbol references in Find All References, so your results look like the code in the editor.
- Ctrl+Click to Go To Definition – Hold down Ctrl, hover over a symbol to create a link, and click to navigate to the definition. This is especially helpful if you are fond of the mouse or if you are scrolling and exploring during a debug session.
- Go To Implementation for .NET (Ctrl+F12) – See all implementations of a base type or member. If there is only one, we’ll jump you right there! In Visual Studio 2017, you can Go To Definition on the ‘override’ keyword in a method signature to go back to the overridden base type or member.
- Navigate to decompiled assemblies for C# source (F12) – Enable this feature to view method bodies of external sources (rather than just signatures in Metadata As Source) when you Go To Definition. To turn this feature on, go to Tools > Options > Text Editor > C# > Advanced > Navigate to decompiled assemblies.
Reason 3: Refactorings and Quick Actions
Each release of Visual Studio 2017 brings more and more refactorings and quick fixes. Any quick action or refactoring can be triggered using Ctrl+. or Alt+Enter (for single-hand accessibility). Here are some of the ones you requested that made it in so far in .NET, across versions 15.0 through 15.8:
- Add null-check
- Invert if-statement
- Resolve merge-conflict
- Convert LINQ query to foreach
- Convert foreach-to-for-loop and vice versa
- Toggle between ‘var’ and the explicit type
- Sync file and type name
- Move type to file with same name
- Add parameter to constructor or method from callsite
- Convert String.Format to interpolated string
- Make private field readonly
- Add missing modifier and sort modifiers
- Remove unused variable
- Remove unnecessary parentheses
For C++ there are a couple new quick actions to note:
- Convert Macro to Constexpr
- Change Declaration to use Constexpr
Because the .NET experience in Visual Studio 2017 is built on the Roslyn language service, any developer can write their own refactoring or code analyzer to automate actions or enforce style. Read our walkthroughs to get started or check out existing community analyzers you can download.
Reason 4: Additions to Core Editor Functionality
We’ve added (and are working to add more) common editor features so you can quickly move around and edit your code:
- Expand/Contract Selection (Alt+Shift+[+/-]) – Grow and shrink your selection by code constructs, i.e., from symbol to expression to statement to body to file.
- Duplicate Line (Ctrl+D in the Default profile) – Duplicate the selected text (or the current line, if no selection) without adding anything to your Copy/Paste clipboard.
- Multi-caret editing (Ctrl+Alt+Click and Shift+Alt+Ins) — Create multiple insertion points via Ctrl + Alt + Click or add new carets and selections that match the current selection with Shift + Alt + Ins.
- Structure guide lines – Easily visualize the structure of your code with vertical lines between braces. Hover on the lines to see a hierarchy of code structure.
- New Keymapping Schemes — If you’re coming from another IDE or coding environment, you can change your keyboard scheme with Tools > Options > Environment > Keyboard and use the drop down to select the new VS Code or ReSharper (VS) schemes.
For C++ development, we have added several other editor improvements:
- Open Folder Mode – Edit, read, build, and debug C++ code by opening folders containing source code without the need to create any solutions or projects. This includes built-in support for handling CMake projects.
- Template IntelliSense – The editor now displays a ‘Template Bar’ which allows C++ developers to provide sample template arguments for improved IntelliSense in class/function templates.
- Macro Expansion in Quick Info – Hovering over a macro will display the actual expansion of the macro that the preprocessor will replace during the first stage of compilation.
Reason 5: Debugging Improvements
The Visual Studio 2017 debugger allows you to diagnose issues faster by surfacing critical information and functionality without requiring new breakpoints and a restart of your debugging session.
- The new Exception Helper – See which variable or member is returning null when a NullReferenceException is thrown, and tweak exception configuration options.
- Step Back debugging (Enterprise only) – Go back to previous breakpoints or steps and view the state of the application as it was in the past.
- Run To Click – Hover at the beginning of a line of code and click the green play button to run the debugger to your location without having to hunt down the yellow instruction pointer.
- Just My Code stepping for C++ – Step over non-user code, so you don’t have to spend your time stepping over countless lines of library code that you’re not interested in.
Reason 6: New and Refreshed Unit Testing Experience
We buckled down on providing a fast and productive unit testing experience for MSTest (v1.0 and 2.0), NUnit, XUnit, Google Test, and Boost frameworks:
- Test Explorer Performance Improvements – Test discovery is fast in Visual Studio 2017 and we will instantly display newly added tests (without requiring a build).
- Test Explorer Hierarchy View — We’ve also added a hierarchy view of your unit tests so that you can explore and run them by project, class, etc. Test runs now also have responsive icons so you can see what tests are currently executing and pending to execute.
- Live Unit Testing for .NET (Enterprise only) – As you type, Live Unit Testing identifies which unit tests are impacted by your code change, runs those tests, and updates icons in the editor to display the results of the test run. You can configure what tests are discovered and run in your “live test set” by including or excluding test projects or individual tests. To enable Live Unit Testing, go to Test > Live Unit Testing > Start.
- Google Test and Boost support for C++ — The Google Test and Boost.Test unit testing frameworks are completely supported and integrated with Visual Studio’s testing tools.
Reason 7: Code Style Configuration and Enforcement
Visual Studio 2017 enables individuals and teams to drive consistency across their codebase with coding convention configuration and enforcement.
- Individual Coding Conventions for .NET – Configure your coding preferences for your machine in Tools > Options > Text Editor > C# | Basic > Code Style.
- Team Coding Conventions for .NET – Use .editorconfig (we worked with the community to extend the open-source file format to work with .NET code style) to codify your conventions and have them enforced in Visual Studio. Say goodbye to managing your rules from a file share!
- Fix All Violations – Use the lightbulb menu (Ctrl+. or Alt+Enter) and select the Document, Project, or Solution scope from the preview dialog to fix all violations of a single rule.
- One-click Code Cleanup for .NET —In Visual Studio 2017 15.8, you can perform additional code cleanup with Format Document (Ctlr+K,D) by configuring it in Tools > Options > Text Editor > C# > Code Style > Formatting and checking fixes like Remove and Sort usings.
- ClangFormat for C++ – In addition to EditorConfig, ClangFormat is supported, giving C++ developers the ability to style and format their code based on a set of rules that can be configured in a .clang-format or _clang-format file.
Reason 8: C# 7.3 and MSVC Standards Conformance
C# 7.0 ships with Visual Studio 2017 by default, bringing language features like tuples, pattern-matching, and out var to help you work with data and make your code more readable. You can also upgrade your project to be on the “latest minor” version of C# and take advantage of features in our point-releases like: async Main, Span, Enum constraints, and more!
As of Visual Studio 2017 version 15.7, MSVC compiler toolset conforms to the C++ Standard up to and including C++17, with minor exceptions. The C++ team worked to significantly overhaul the compiler, making it far easier to implement modern C++ features. Additionally, we added the C++ Core Guidelines Check extension (CppCoreCheck). This extension is designed to make it easy to adopt C++ Core Guidelines and adopt utilities from the Guidelines Support Library.
Migration to Visual Studio 2017 for C++ is easier than ever before. Visual Studio C++ 2017 is binary compatible with Visual Studio C++ 2015, so there is no need to rebuild your 2015 component. Furthermore, the decoupling of toolsets means that you can use your toolset from 2013 or later.
Upgrading may be extremely easy for your team–if you and your team are on Visual Studio Community or have an EA/Subscription, you already have access to a Visual Studio 2017 license today. To learn more about how to upgrade, visit our upgrade site. To learn more about how you can be productive in Visual Studio 2017, check out the productivity guide for .NET developers for a comprehensive overview of our tools and features.
Give Us Feedback
We’re releasing updates to Visual Studio at a faster cadence than ever before so that we can unblock you on any issues you may have and evolve and create features to make you more productive in your everyday workflow.
Use the Send Feedback button inside Visual Studio to have direct access to the product team (we look at all of them!) and to easily share memory dumps and traces so that we can more quickly investigate issues with performance you may have. Also, use the button to request productivity features you need to code with ease and confidence. We are here to help you upgrade!