RSS

VS Live Las Vegas 2018 Day 3: What’s New in Visual Studio 2017 for C# developers

14 Mar

This session introduced us to some new features that are introduced in Visual Studio 2017.

Here are some key takeaways for me from the session that was presented. But I was so much excited about the changes that I did visit the Visual Studio site for more information

Code Style Enforcement: This includes the open source file format EditorConfig that assists developers to configure and enforce formatting and code style conventions to achieve consistent, more readable codebases. For more information refer to this blog.

Unit Testing: Some of these features might be available only in Enterprise Edition.

  • Generate unit tests for your code with IntelliTest: This feature explores your .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code. The developers can easily see which tests are failing and can add code to fix it. This is enterprise feature only. You can explore the steps here.
  • Live Unit Testing: As developer is developing their application, the live unit testing runs any impacted unit tests in the background and provides the results in VS IE in real-time. This is VS Enterprise edition only. For configuration and setting it up please review the steps here.
  • UI Testing: This helps the developer to verify that the whole application, including its user interface is functioning correctly by automating tests that drive your application through its user interface. This is Enterprise Edition only. In order to create the UI tests please refer to this Microsoft Documentation.

Writing Code: 

  • Intellisense: Exploring the new APIs is faster now and the developer can narrow down the set of values by category. The Quick Info tool tips lets the developer inspect API definitions, and squiggly lines lets the developer know about issues.
  • Navigating code: This was amazing. This has always been an issue when you want to search for certain things in large code base. Now VS helps the developer to find the code with the kind of item to look for. For example if you are looking for certain type, you can start the search with t and then space and then the word. This narrows the search results to types only.
  • Fix issues quickly: The light bulb icons help to identify and fix common coding issues.
  • Variable naming suggestions: As you are typing VS IDE will provide suggestions for variable naming for objects.
  • Unreachable code is faded out. Even if you have some using statements and are not used in the code then it will fade out.
  • Ctrl+D duplicates the line you are on. In the past you had to do Ctrl+C and Ctrl+P. Be aware that Ctrl+D does not copy it to clipboard.
  • Now you are allowed to go to the definition of an object even in a compiled library. It does provide you a legal statement that the developer needs to accept.

FxCop Analyzer: Identifies performance improvements by analyzing the source code. This is available as extension to VS 2017 or through Nuget Package. The extension is named Microsoft Code Analyzer and Nuget Package is Microsoft.CodeAnalysis.FxCopAnalyzers

Roslyn Analyzer: This is a code name for Analyzers that are powered by .NET Compiler Platform. This can produce warnings in the developers code as they are typing and using Nuget packages.

Shortcuts:  Lot of shortcut keys were shown. Here is a complete list of shortcuts – http://visualstudioshortcuts.com/2017/

Overall very nice introduction to some of the new features. I would definitely recommend visiting the Visual Studio site to get into more details.

 
Leave a comment

Posted by on March 14, 2018 in Visual Studio

 

Tags: , , , ,

Leave a comment