SharePoint Pals
 | Sign In
NuGet Manager Console – an Introduction
by Sathish Nadarajan 27 Jun 2016
Author
SharePoint MVP
Visits   
Today  :   6     Total  :    2478

In recent days, we have been addicted to use the NuGet Packages and atleast hearing the word Import / Install NuGet Package. It applies to me as well, that simply go to the NuGet Manager Dialog and install the required / Suggested J Packages. Hardly, we would have gone to the NuGet manager Console and look at the various options over there. Today, I got a chance (probably a problem) to look on the Console. Hence, thought of sharing the same to the community.

Before Starting, let us have a small demo on what we have used till now using the Dialog Window.

1. Open the Visual Studio.

2. Create a Solution.

3. Right Click on the Reference, or even on the project file.

clip_image002

4. Click on the “Manage NuGet Packages”

5. The below widget will be opening.

clip_image004

6. Usually, we will search for the package given on the solution and click on Install.

But, today I faced some sort of problems after Installing the Package. Then, I was suggested to do the UnInstall, Update the packages etc. to make my TFS code to work.

Hence, opened the Manager Console.

1. Go to Tools and Click on the Package Manager Console.

clip_image006

2. The below Window will be opening.

clip_image008

3. On the Console, type “Get-Help NuGet”

4. The available Commands for the NuGet Console will be appearing.

Cmdlet

Description

Get-Package

Gets the set of packages available from the package source.

Install-Package

Installs a package and its dependencies into the project.

Uninstall-Package

Uninstalls a package. If other packages depend on this package, the command will fail unless the –Force option is specified.

Update-Package

Updates a package and its dependencies to a newer version.

Add-BindingRedirect

Examines all assemblies within the output path for a project
and adds binding redirects to the application (or web)
configuration file where necessary.

Get-Project

Returns a reference to the DTE (Development Tools Environment)
for the specified project. If none is specifed, returns the
default project selected in the Package Manager Console.

Open-PackagePage

Open the browser pointing to ProjectUrl, LicenseUrl or
ReportAbuseUrl of the specified package.

Register-TabExpansion

Registers a tab expansion for the parameters of a command.

5. Now, let us execute each of the commands and have a look at the output.

6. Get-Package – This will list all the packages installed.

clip_image010

7. Install-Package “Package Name”

clip_image012

clip_image014

8. In the Same Manner unInstall-Package “Package Name”

clip_image016

9. The rest of the commands are straight forward and we can try them whenever we require.

10. Once, the package has been installed, the necessary DLLs will be added with the Solution.

11. A new folder called “Packages” will be created in the Solution Folder. Note, this will not be the part of your solution. No need to Add this on the TFS. This is the mistake, which I did today.

12. clip_image018

13. We can see the installed packages inside the packages folder.

clip_image020

Let us catch up with some more interesting topics soon.

Happy Coding,

Sathish Nadarajan.

blog comments powered by Disqus

SharePoint Pals

Pals
SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile

Training

Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community




SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to articles@sharepointpals.com in a word document.

Related Resources

Recent Tweets

Twitter January 15, 00:25
How To Enable Target Value And Actual Value In #D3 Gauge Chart https://t.co/VxSi4QnNrC

Twitter January 15, 00:24
How To Open #SharePoint List Hyperlink Column In Modal #Popup Window https://t.co/EQ7HkoZDkX

Twitter January 15, 00:24
Quick Introduction To #Asp.NetCore And It’s Features https://t.co/zAXObHCFpH

Twitter January 15, 00:22
How To Configure #PerformancePoint Services To Use Secure Store In #SharePoint 2013 https://t.co/LEwnUoI7EY

Twitter January 15, 00:21
How To Block Or Disable #Office365 Services https://t.co/Yvp2VPFIRP

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation