chevron-down chevron-right chevron-up comment dropdown facebook folder google-plus label linkedin loupe next perk-01 perk-02 perk-03 perk-04 perk-05 perk-06 perk-07 perk-08 pin previous twitter

Visual Studio 2017

Visual Studio 2017 was recently released and this is a quick overview of my favorite features and how you can get started!

First of all, start by downloading Visual Studio. At Caspeco we use the Enterprise version because we are Microsoft Partners, but you can also download the free Community edition. The installation took quite some time on my laptop but you can pick which parts of the IDE you want (Web developement, SQL and Xamarin support etc) which will speed it up.

Overall impressive

There is a ton of new features and performance boosts in VS2017. As of this time, I don’t see the need to use the ReSharper plugin because of the good built in refactoring and code navigation tools. Read the official Microsoft blog post for a more complete announcement.

My favorite picks

I’ve picked out some features I really like, but feel free to add yours by editing this post.

Live unit tests

In Visual Studio Enterprise you can enable Live Testing. This means quite a few things. It will run your unit tests as you edit your code. It’s smart enough to only run the tests affected by the code your editing.
Here’s how to enable it: Enable VS Live Testing

It also shows if affected tests are passing right along your code. No need to pause your coding to run tests and look at the test result in a different (and often dissapearing window). VS Live Testing Preview

All in all, it makes the development cycle tighter, which gives me more time to work on the code and less on the tools.

NullException now shows what’s null

Previousley it would just say that “something is null, buddy!”. Now it will actually tell you what is null. Fiiiiinnally. NullExceptions

Structured & syntax colored “Find all references”

Find all references previousley looked a bit like notepad, which made it difficult to find what you were looking for. The new and improved version structures the results and adds syntax highlighting. Find all references

Intellisense is improved

Intellisense added both filtering & CamelCase matching.

Filterings allows you to only show classes, members, interfaces and so on by toggling buttons or by using the keyboard shortcuts: Improved intellisense

Keyboard shortcuts (notice the pattern):

  • Classes Alt+C
  • Interfaces Alt+I
  • Enums Alt+E
  • Structures Alt+S
  • Delegates Alt+D
  • Keywords Alt+K
  • Namespaces Alt+N
  • Snippets Alt+S

CamelCase matching allows you quickmatch and expand long class names. Instead of writing DictionaryException you can type DicE and get a match.

Refactoring

Refactorings – use Ctrl+. or Alt+Enterto access all the refactorings and quick actions added in VS. Here is an overview: * Move type to file with same name * Sync file and type name * Add missing switch/Select case * Make method synchronous * Convert method to property, and vice versa * Convert to interpolated string

Go To

Use Ctrl+T or Ctrl+, to use the new Go To feature. Here’s what microsoft says:

  • Go To Implementation (Ctrl+F12) – navigate from any base type or member to its various implementations.
  • Go To All (Ctrl+T or Ctrl+,) – navigate directly to any file/type/member/symbol declaration. You can use the icons along the top of the feature to filter your result list or use the query syntax (e.g., “f searchTerm” for files, “t searchTerm” for types, etc.).
  • Find All References (Shift+F12) – now with syntax colorization, Find All Reference results can be custom grouped by a combination of project, definition, and path. You can also “lock” results so that you can continue to find other references without losing your original results.
  • Indent Guides ­– dotted, gray vertical lines act as landmarks in code to provide context within your frame of view. You may recognize these from the popular Productivity Power Tools.

Make notice of the prefix filter (m “foo” or “t bar”) to quickly filter out classes/members etc.

Hints

Use Alt+Enter or Ctrl+. to autofix code standards and explore suggestions, warnings and errors.

You can also configure code standards (similiar to eshint, tshint, FxCop) in the new .editorconfig file. Powertip is to use Mads Kristensen VS extension for this file format.

Last thoughts

Solid update. I like it. We had to upgrade our Antlr package in order to build. But that was the only thing not working in the upgrade.

Happy Coding!

-