With the recent updates of Visual Studio 2015 (Update 3 RC), we can now install and add references for Nuget Packages as part of quick fix light bulb. Like wise, adding references from installed assemblies, Visual Studio now also suggests Nuget Packages for references for the specific types. Then you can install and refer the latest version automatically or take help of package manager to install specific versions for the same Nuget Package.
Consider an example of using JSON.NET in your application, where either we do install the packages from Package Manager, Package Manager Console. Now, with the Visual Studio updates, the yellow light blub also suggests for quick fix to add and install Newtonsoft.Json nuget package.
You can select “Find and Install latest version” which will install the Nuget references in solution explorer, also refer the same in the file.
In case you select “Install with Package Manager”, Visual Studio will open the Package Manager with Newtoksoft.Json as search item. Here you can select specific versions to install.
Related Post : How to Install a local sources NuGet package or a Prerelease package in Visual Studio 2015 ?
You can enable this features from Tools –> Options dialog windows.
Navigate to C# Languages option and from Advanced Tab, select “Suggest usings for types in Nuget packages”
Hope this helps !
Pingback: Dew Drop – June 9, 2016 (#2268) | Morning Dew
Pingback: Visual Studio – Developer Top Ten for June 20th, 2016 - Dmitry Lyalin
Pingback: Channel 9 To Live-Stream Visual Studio Live! | Codango.Com
Very nice and informative post. Thanks for the share.