NuGet Package Manager is an extension for Visual Studio that simplifies installing third party libraries for a project. [link]
NuGet Package Manager downloads a package containing the third party library and configures the project to use the library.
Normally you would have to download and extract the library, configure the project to find the Include and Lib directories of library and add the library’s *.lib file or files to the project’s dependencies in the project’s Property Pages.
To install NuGet Package Manager, run Visual Studio while connected to the internet.
Go to TOOLS>Extensions and Updates….
Expand the Online section and click Visual Studio Gallery and Visual Studio will retrieve information about available extensions.
Find and select NuGet and click on the “Download” button. Use search if need be.
Install NuGet. The UAC allow changes dialog may appear before the following dialog.
You must restart Visual Studio to use the NuGet Package Manager extension.
Access Nuget Package Manager from the TOOLS menu.
To find out if a third party library is available, search for the library at the NuGet site.
The webpage for the package will contain a command which is used to install the package into a project.
To install a package into a project open the solution/project in Visual Studio and go to TOOLS>NuGet Package Manager>Package Manager Console.
This will open the Package Manager Console.
At the prompt, “PM>” type the install command for the package followed by –ProjectName, followed by a space and your project name and press the “Enter” key. If your project is the StartUp project which is displayed in Bold in the Solution Explorer you do not have to specify a project name.
You must be connected to the internet to download a package.
The reference for the console commands can be found here. [link]
NuGet installs the WTL package. Note you also get an option to install the WTL App Wizard into Visual Studio.
There is another way to install a package with NuGet.
Right click on the project in Solution Explorer and click Manage NuGet Packages….
A list of available packages will be retrieved from nuget.org.
Search for the package you want and click install.
The third party libraries installed with NuGet are located in a folder named “packages” located in the solutions folder or if there is no solution, inside the project’s folder.
next
No comments:
Post a Comment