Finally what we all had been waiting for is here, Visual Studio 2015 RTM has been released last month.This version of Visual studio includes many new features.
There have been many releases of the Visual Studio over the years .Each new release introduced a new and enhanced version of the .NET framework.This version includes .NET Framework 4.6 .
We have seen many new frameworks released such as MVC for web application development,WPF for windows applications,WCF and WebAPI for service based applications.Visual Studio 2015 includes not only ASP.NET 5 but also lots of new and useful features.
Following are some of the new and Important features in Visual Studio 2015
Diagnostic Tools
The Diagnostics Tools window allows us to view and analyse the performance data when we are debugging the code.It can provide us with details such as memory and CPU consumption.This allows us to view how the code is behaving and optimize it accordingly.
Perf tips
This feature provides us information about how much time a particular block of code is taking.If we set two breakpoints then at the second break point line it will show us the time it took to to execute the code between the two breakpoints.
In the above code it is showing that it took less than 2ms to execute the code.Perf tips and diagnostic tools allows to analyze the performance early while developing code.This means less refactoring is required later on for performance related issues.
New compiler
Visual studio 2015 includes a new compiler called Roslyn.Roslyn is an open source compiler API for C# and VB.This means that we can use the API to write tools such as code analyzers.
New compilation model informs us of the errors in the code as we write the code.For example in the previous versions we had to compile the code to get the information about any compilation errors but now we are informed about the errors in real time as they occur.
In the following code as soon as the code is typed in the Visual Studio 2015 editor error is displayed in the error window
LINQ and Lambda expression support in Immediate and Watch windows
We always wanted to be able to execute lambda expressions and LINQ queries in the immediate and watch windows but previous versions of Visual Studio didn’t allow this.Visual Studio 2015 gives us this option.So if we have the following generic list of integers
var ids = new List<int>() { 1, 2, 3, 4 };
then we can execute the following LINQ query in the immediate window
ids.Where(id=>id==1)
C# 6
This version of Visual Studio includes C# 6 which has features such as
- Null-Conditional Operator Helps avoid the null reference exception
- string interpolation Convenient way to format strings without calling String.Format
- Expression-bodied members Allows us to write functions members such as methods using more compact syntax
- nameof operator To get the name of a program element such as variable name
Quick Actions Light Bulb for refactoring code
Light bulbs are icons that appear to provide help in refactoring of code and fixing of errors.So light bulb means that Visual Studio can automatically apply code updates for us.This can save us time spent in writing the code.
For example the following light bulb appears when we hover over the undeclared variable
On clicking the light bulb icon Visual Studio displays the various options to fix the error and also the preview of the refactored code.
Javascript Editor Enhancements
Now Visual Studio supports AngularJS and RequireJS.So the editor understands these frameworks and will provide intellisense for them.
Editor now supports many of the language feature in ECMAScript 2015.This means that it now natively supports JavaScript and understands the javascript language elements .Editor also displays navigation bar for the javascript language elements ,such as methods and class,as it displays for other languages such as C#.
TaskList
We can use comments such as // TODO: or // HACK: which Visual Studio will keep track of and display them as reminders in the task list.
Cross platform support
The previous frameworks have always targeted the windows OS.There was no way to directly develop mobile applications in Visual Studio for the different platforms such as iOS, Android and linux.
Visual Studio 2015 includes Xamarin which is a platform to build cross platform apps which runs on different platforms such as Android,iOS and Windows.It is possible to build applications using Xamarin in the previous frameworks also but it was not part of Visual Studio earlier.Now we can build cross platform applications from within Visual Studio.
New IDE’s
Unlike the previous versions of the Community edition in which many of the required features were missing it now includes all of the necessary features.Visual Studio Code is the new code editor which is free and supports different platforms such as Mac OS, Windows, and Linux.It supports
many of the features of the Visual Studio.
It is available at Code for Visual Studio
ASP.NET 5
Visual studio 2015 supports developing ASP.NET 5 applications.Unlike previous versions ASP.NET 5 is now open source on GitHub through the .NET Foundation.ASP.NET 5 is cross platform and supports Windows, Mac, and Linux.
The open source support in this release of Visual studio is reflected in the types of frameworks the IDE supports.Now IDE provides intellisense support for Angular and Node.js out of the box.Another area where it reflects is the integration between Visual studio and GitHub.
Leave a Reply