Visual Studio 2019 – New Features – AI Code Assistant

Apple’s WWDC Keynote news will be dominating most of the tech news in the coming week, however I thought it would be worth to note that Microsoft’s AI powered IntelliCode Assistant is now generally available.

This new feature builds on the great IntelliSense features of Visual Studio, which essentially provide you with type-ahead code recommendations. Microsoft trained IntelliCode by feeding it the source code of thousands of open-source GitHub projects (with 100 stars or more). By combining this data and the context of your code, it can make much smarter recommendations. For instance instead of just offering just an alphabetically sorted list of all the properties, methods and events of a class, you now get far more clever suggestions which in most cases eliminate the need for scrolling.

So far it offers coding recommendations, argument completion as well as inferring code style and formatting conventions. It supports C#, C++, TypeScript/JavaScript and XAML. Of course, this is only the beginning of what Microsoft can do with this new feature. For now it will help save a lot of time while helping developer reduce bugs by making better choices as they write code.

The new feature is available on Visual Studio 16.1 and as an extension for Visual Studio 2017 version 15.8. Try it yourselves today. There is also an extension available for Visual Studio Code.


Visual Studio 2019 – New Features – Data Breakpoints

There are two new additions to Visual Studio 2019, full .NET Core 3.0 support and Data Breakpoints.

When .NET Core 3.0 is released later on this year, it will be fully supported by the latest version of Visual Studio. .NET Core 3.0 (currently in Preview 3) is already supported within the IDE, but Microsoft decided to delay its full release until the autumn, when it will be fully integrated. However, it currently needs to be installed separately and enabled within the IDE.


Once you have installed and enabled support for .NET Core 3.0 you can play with a very useful new feature, Data Breakpoints. Once available only to C++ developers, it has now been adapted to work with .NET Core 3.0 applications. This feature allows you to break your execution, and jump into the debugger, when a variable’s value changes. This makes finding where a global objected is being modified very easy.

Visual Studio 2019 – New Features – Decompiled Resources

Visual Studio 2019 was released this week and it is now available to download and use from Microsoft. Check which edition is right for you and download it.

Over the next few weeks I will try to cover some the new features in this version. However, I would like to start with something that’s been close to my heart recently. The ability to easily decompile external resources.

We have all been stuck trying to fix a bug in our code only to be mystified at the output of a NuGet package, or an external library that is used in our code. Not knowing what’s going on within an external module, during debugging, is very frustrating. Having to deal with a black box situation makes life complicated. Developers always had the ability to use tools such as ildasm to decompile third party libraries, so they can take a look at what might be causing the issue they are trying to resolve. But having to interupt your debug flow mid way to look at a separate application to figure out what’s going on is not very intuitive.

With Visual Studio 2019, the ability to step into third party decompiled source code is now a check box away!

To enable this feature, simply select Tools > Options. Type “decompile” into the search bar and then choose the Advanced section of Text Editor for C#.

This is still an experimental feature, but extremely useful.

Browser + Razor = Blazor!

In case you missed it, a few days ago Microsoft decided to enter the Single Page Application (SPA) frameworks war. Well not in a fully committed way yet, but nevertheless in a rather interesting way. Blazor will allow developers to write SPA Web applications, using C# and Razor syntax. Yes you will be able to build composable web UIs using C#! This is direct competition with popular frameworks such as Angular and React. I know what you will all say “I just got done learning Angular, React, Aurelia, Meteor, Ember, Polymer, Backbone, Vue, Knockout, Mercury, and was so looking forward to learning the next great JavaScript framework”. Well you still can but maybe, just maybe in the future you might not have to.

This is all made possible by the work the Mono team at Microsoft has been busy with. They have been working on bringing Mono to WebAssembly. WebAssembly has been around for a while now and it allows for the efficient and safe execition of code in web browsers. As a matter of fact WebAssembly is an open standard and with the introduction of iOS 11 it is now pretty much universally available on all major browsers. The Mono team has managed to bring the ability to run C# code within WebAssembly and hence develop applications using C# and Razor that natively run in the browser. WebAssembly is designed as an open standard by a W3C Community Group. You can learn more about it

All this is currently in the very early stages of development but it is all very exciting. Even though Microsoft says this is not a committed project, it seems to be heading to the right direction. This could help Web Developers to finally have a “go to” framework for SPA development instead of having to learn and pick between the ever changing JavaScript SPA frameworks.

You can see a live demo here

This is all part of the long term Microsoft strategy to embrace as many environments and tools as possible. They have been heavily investing in attracting as many developers as possible to their ecosystem. With their efforts in delivering open source frameworks and free cross platform development environments they are aiming to get people using their tools with the hope, of course, that they will choose Azure as their hosting platform. Long gone the days that Microsoft can demand huge sums for IDEs and compilers. Nowadays all an engineer needs is a good text editor and an LLVM compiler and off they go. Microsoft simply decided to provide most of their tools free of charge in order to attract people to their platform. Blazor is another great example of how they are shifting and embracing this brave new open world.