I have installed NuGet, how to use it?
开发者_JAVA技巧I saw the video and i tried
>Add-Package log4j
Command "Add" is not valid.
>
it does not work, I entered that in Command Window.
EDIT:
I uses VS2010 and I build WindowsForm App and not ASP.NET.
You've got two options;
You can either use the GUI; right click on project references > Add Library Package Reference...
Or you can use the console, which has more features, but I'd not recommend it.
You're entering this in the Command window when you should be entering it in the Package Manager Console window. Open it through 'View' / 'Other windows' / 'Package Manager Console'.
To answer your specific question besides the documentation link:
Using the Package Manager Console you can find a package by filtering it i.e.:
get-package -remote -filter Log4net
Once you find the package you want, you can add it to your project with
install-package log4net
That's all there is to it - if you don't need to use the console then for casual use the Add Library Package Reference Dialog Box (that's a handful) provides an easy to use UI to add packages.
Click on project --> Manage nuget packages.
You can see this youtube video which shows the importance of Nuget and how to use by using VS 2012
http://www.youtube.com/watch?v=AXfZsTj-7P0
If you have visual studio 2013 or above.. the solutions now come up with Nuget package manager and a packages.config file is also added to the solution. packages.config file contains information about all the packages present in the solution.
Read more > About Nuget Install/Uninstall & Downgrading
精彩评论