Package Visualizer can let you know what packages are using and how are their dependencies in between.
In the menu bar, TOOLS –> Library Package Manager –> Package Visualizer
By default, the output is Top to bottom
We can switch to Left to right
Package Visualizer can let you know what packages are using and how are their dependencies in between.
In the menu bar, TOOLS –> Library Package Manager –> Package Visualizer
By default, the output is Top to bottom
We can switch to Left to right
NuGet Version: 2.5.40416.9020
usage: NuGet <command> [args] [options]
Type 'NuGet help <command>' for help on a specific command.
Available commands:
| config | Gets or sets NuGet config values. |
| delete | Deletes a package from the server. |
| help (?) | Displays general help information and help information about other commands. |
| install | Installs a package using the specified sources. If no sources are specified, all sources defined in the NuGet configuration file are used. If the configuration file specifies no sources, uses the default NuGet feed. |
| list | Displays a list of packages from a given source. If no sources are specified, all sources defined in %AppData%\NuGet\NuGet.config are used. If NuGet.config specifies no sources, uses the default NuGet feed. |
| pack | Creates a NuGet package based on the specified nuspec or project file. |
| push | Pushes a package to the server and optionally publishes it. |
| NuGet | 's default configuration is obtained by loading %AppData%\NuGet\NuGet.config, then loading any nuget.config or .nuget\nuget.config starting from root of drive and ending in current directory. |
| setApiKey | Saves an API key for a given server URL. When no URL is provided API key is saved for the NuGet gallery. |
| sources | Provides the ability to manage list of sources located in %AppData%\NuGet\NuGet.config |
| spec | Generates a nuspec for a new package. If this command is run in the same folder as a project file (.csproj, .vbproj, .fsproj), it will create a tokenized nuspec file. |
| update | Update packages to latest available versions. This command also updates NuGet.exe itself. |
For more information, visit http://docs.nuget.org/docs/reference/command-line-reference
Open up NuGet Package Explorer, and then click Open a package from online feed
Search NuGet.Command
Expend tools in the right window, right click on NuGet.exe, save it to any local directory
The file name, default is NuGet.exe
Using Command Prompt and locate to NuGet.exe folder (C:\TEMP\NuGet\ as the example here)
List all available commands and their description by typing NuGet Help
Install-Package NuGet.Server
Open Web.config file, make sure to delete first <compilation …> node due to i don’t have .NET framework 4.5 installed in my local
Ctrl-F5 to run the application
Click here to the link http://localhost:xxx/nuget/Packages, so far no package inside
Let’s add a new source feed to our local server
No package could be found so far
****************************************************************************************************
Let’s do copy and paste a package into our project->packages folder
Copy from temp folder
Paste to Visual Studio project –> Packages folder
After that, refresh the page again, we will see the package shows
It’s more clear showing in IE browser
We can also find it in Manage NuGet Packages window
Or using Package Manager Console, Get-Package –ListAvailable (don’t forget to swith to righ source)
LINQPad is also supported
In the previous blog, Create a new NuGet package, we successfully create a NuGetExample.1.0.0.nupkg
Now, let’s using it in our Visual Studio project.
Create an empty MVC4 project, so far there is no Scripts folder
We can install jQuery but version 1.7 first into our project by execute command in Package Manager Console
Install-Package jQuery –Version 1.7
Now, Scripts folder and 3 jQuery .js files are added
Click to open Package Manager Settings
Add a new local source which we created in previous blog
Open Manager NuGet Packages window, switch to “Local 2” source, we are now able to install our own package, NuGetExample with jQuery 2.0 dependency
Installing…in progress
After that, we can see both our script file, MyNuGetScript.js and jQuery 2.0 are added in our project
*********************************************************************************************************
By the way, if we are trying to Uninstall-Package jQuery, we will encounter an error saying that due to NuGetExample has dependency with jQuery
Download NuGet Package Explorer and install it
After installation, double click to open it and click Create a new package
In the CONTENT menu, select Add –> Content Folder
Right click on content –> Add New Folder, Scripts
Right click on Scripts folder –> Add Existing File…
Select the existing file that we created in advance, MyNuGetScript.js, for example
Right click on MyNuGetScript.js –> View Content
Now we would like to add Dependency of this package, jQuery, for example.
In EDIT menu –> Edit Metadata
Scoll down to bottom, click on Edit dependencies button
Add a new group
Select dependency from NuGet feed
Search jQuery, and double click to select it
Click + to add, then click OK
Click Save
Now we can see the jQuery list in Dependencies
Save the package
By default, the file name will be [Id][Version].nupkg
PowerShell command documents can be found in the link http://docs.nuget.org
Scoll down a bit to click the link, Package Manager Console PowerShell Reference
We can see the PowerShell commands in the right hand side of screen, Doc Outline.
Each command including 3 parts.
In Visual Studio, we can also type Get-Help NuGet to see the document
Get-Help Get-Package
Get-Help get-package –example