Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

VS 2015 Update 3: installing a NuGet package as a quick action in the Light Bulb

Among the others, my favorite feature in Visual Studio 2015 Update 3 is the option of adding a NuGet package as a quick action in the Light Bulb, when you type the name of an object that is not defined anyway in the solution. For instance, consider the following figure:




I'm trying to use an object called JsonConvert, which is neither part of the BCL nor defined inside any referenced library. So, if I enable the Light Bulb, I will find a new quick action that suggests me to install from NuGet the Newtonsoft.Json library, which actually defines the JsonConvert object. I need just one click to install the latest version of the library from NuGet, or I can decide to enable the NuGet UI in order to select a different version. In the first case, it's almost immediate:



As you can see, the library is downloaded from NuGet, installed, and referenced. Also, the proper Imports (or using in C#) directive is automatically added and the object is recognized properly.

Notice that this option is not enabled by default, so you first need to go to Tools, Options, Text Editor, Basic (or C#) in the Advanced node and select the option for NuGet suggestions:



A very useful feature, especially if you know in advance the name of objects you use and you want the IDE to do the job for your.

Alessandro

Print | posted on domenica 24 luglio 2016 21:09 | Filed Under [ Visual Studio 2015 ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 5 and 1 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET