By Igor Let | Software Developer 08.01.2017.
What’s new in Visual Studio 2017
New version of everyone’s favorite IDE is here (well, the release candidate) with lots and lots of improvements and new features. In this blog post we’re talking about some of them.
Installation of Visual studio used to be painfully slow and in the end you used to end up with a lot of things you didn’t really need. This has changed. VS 2017 uses a new installer which enables you to choose which specific features you want to have. The core installation weighs only a couple of hundreds of megabytes.
User can easily pick which parts of VS he wants to install. He can choose from large workloads (groups of functionalities) or pick pieces of functionality individually.
In general, this version of Visual Studio is much lighter and faster than previous ones. For example, large projects are opened two times faster than with VS 2015.
I could never memorize the shortcut for RunToCursor in Visual Studio, it was always difficult to find it among other options in the popup menu and F10 doesn't help much when you are in a loop. The ugly solution was to set multiple breakpoints in a method. Now, when a breakpoint is hit and when you hover the cursor over a line of code, a little arrow appears which enables you to run the code to that line.
The navigation pane (the one you get when you press Ctrl +, or Ctrl + T) is much better in this version. When you start typing in the search box, suggestions appear and each one shows a preview when it is selected in the list. After you press Enter you actually open the file.
Find All References window also shows previews now. As you can see in the previous image, new VS now shows dotted lines connecting pairs of curly braces. When you hover the cursor over the lines it shows the code structure starting with outmost construct and ending with the current one.
Live code analysis and refactoring
Visual Studio lets you refactor your code by pressing Ctlr +. or by clicking on the dotted line under the piece of code that Visual Studio doesn’t like. When you click on it, the suggestion pane appears and code action can be executed. For every code action, there is a preview option which shows you how your code will look like after the change. Style rules are configurable and can be suppressed. Many of suggested code actions can be applied not only to a specific piece of code, but also to the whole project or solution (e.g. you can add braces after each if-statement in the solution).
Live unit testing
Previous versions of VS could show you if a method is covered with a unit test, but this version goes much further than that. In Enterprise version, there is a new option in Test menu called Live Unit Testing. Instead of just putting a link to the test, when this option is checked, VS actually runs the tests live, while you’re modifying the code, and shows you if they’ve passed or failed. Tests are re-run after every code change. If a method is not covered with a unit test, VS gives you an option of scaffolding one, which speeds things up a lot.
But that is not all, if you provide comments for your own JS methods, VS will show you IntelliSense for them as well with all information about parameters’ names and types, return type and so on.
I don’t have enough space here to write about all the new features of VS 2017. There are lots of new features regarding .NET Core, Xamarin, Docker, Azure etc. For more info read the release notes.
By Igor Let | Software Developer 08.01.2017.Follow him on LinkedIn