Aside from the improved installation experience there are some features in Visual Studio 2017 that will warrant genuine moments of appreciation in our day to day labors. Here are my three favorites features so far.

1. Exception Handling

This may not seem like a big deal but getting to the bottom of a stack that has produced a null exception happens early and often in the development life cycle. You are usually shown a message like this:

"Object reference not set to an instance of an object.”

To which the collective developer world responds with “What object are you talking about?”

Now VS2017 will do its best to surface where it assumes the source of the null exception is generated, in this example the public member variable (Sub) is null and the popup bolds the value so even complex, nested objects can easily be identified.

Visual Studio 2017 Exception handling

2. IntelliSense Improvements

When you start declaring a variable type IntelliSense displays a tray of icons that allows you to filter the list by category, the categories include locals, methods, interfaces, classes, structures and enumerable types, this is very useful for sprawling projects and namespaces.

VisualStudio2017Intellisense

3. Coding conventions

Visual Studio has had a number of plugins that can support your teams coding conventions over the years, but with Visual Studio 2017 now can support this concept natively. It does so using the open source Editor Config standard, this convention helps developers define and maintain consistent coding styles between different editors and IDEs.

Admittedly its implementation is still a little clunky in that it requires restarts when you make a change. Here for example are the steps I followed to warn developers about using the var keyword.

  • Add a new item to the project at the root and name it .editorconfig
  • Add the following lines to the config file:
    root = true;
    [*.cs]
    csharp_style_var_for_built_in_types = false:suggestion
  • Restart the IDE

Now you will see Visual Studio light up with Quick Actions advising you to use string instead of var.

Visual Studio 2017 Editor Config

There is obviously far more improvements to talk about, but these will definitely help me on a daily basis!



Comment Section

Comments are closed.