Introduction to use Visual Studio 2010 expansion kit: NUGET kit administrator

2022-12-22   ES  

Microsoft’s development platform has not been like other kit management tools commonly like other development platforms. For example, PHP is availablePEARusable, Perl also has PPM (Perl package manager), even Python also has Pypm (Python Package Manager) and so on. Around August last year, Microsoft began to conduct a kit administrator’s development plan.NuGet, this tool is mainly used in combination with Visual Studio 2010, allowing you to install and update the kit at any time in the process of using Visual Studio 2010 development project, likejQueryELMAHlog4net, … and so on.thousands of kitsto choose from,

The appearance ofNuGetcan be said to be the gospel of all developers, and it is definitely one of the must -learn tools!

Nuget project on CodePlex contains three tools to download:

  • NuGet Visual Studio extension 
    Perfectly integrated into Visual Studio 2010, you can quickly install the kit in the project
  • NuGet Package Explorer 
    can be used to browse all the Nuget kits on the line, or it can also be used as a tool for making Nuget suits
  • NuGet.exe Command Line 
    NUGET Kit Management instructions for automation operations for automated operations (for example, the original file of the downloading online kit, or publishing the kit written by itself toNuGet Galleryand so on)

Remarks: Download URL of the above tools:

1. NuGet Visual Studio extension

Installing Nuget Visual Studio Extension is also the same as the previous expansion kit. It can be installed through the expansion administrator of Visual Studio libraryclassification, and then enter in the search text box in the upper right cornerNuGet can be foundNuGet Package Managerproject.

Note: InstallationNuGet Package ManagerMust be installed firstPowerShell 2.0, if your operating system is already Windows 7 or Windows Server 2008 R2, you don’t need to install it (because it has been built).

Then we use oneBlogEngine.NETProject to explain

The use ofNuGet Package Manager, in the process, we will useNuGet Package ManagerInstall jQuery 1.6.1 to the project.

After opening the plan or project, we can select the right -click after any project node of the plan of the planAdd Library Package ReferenceOpen the kit to select the window:

Then we enter in the upper right corner of the windowjQuerySearch and findjQuery 1.6.1After thatInstallInstallation:

After the installation is completed, there is no need to reopen Visual Studio 2010. This kit will automatically install it into your existing project, as shown below:

If you want to remove the installed kit, open through the same stepsAdd Library Package ReferenceWindow, and click the Installed Packages page to select the installed items

TheUninstallbutton can be removed to remove the previously installed kit:

above is throughNuGet Package ManagerThe standard method of installing the kit, so farNuGet Gallery1523Sets are available for download and add several kits every day. It is foreseeable that Nuget should be very common in the future. Many open original codes of tools and kits will slowly release them here.


After installing the kit, if there is a updated version of the Visual Studio 2010, you will take the initiative to ask you if you want to upgrade the kit. For example, the JQuery 1.6.2 version will be launched in the future. The process is exactly the same as using Visual Studio 2010 to expand an administrator, which is very convenient.

In addition to the window interface, we can also use itPackage Manager Consoleto manage the kit used in the project, the opening method is as shown below:

The window after opening is actually

The execution window ofPowerShell, entered the CMDLETS of PowerShell, for example, the instruction of installing the jQuery kit isInstall-Package jQuery

The instructions to remove the jQuery kit are the instructionsUninstall-Package jQuery

Another must be used

The situation ofPackage Manager Consoleis when you want to installOld version kit

When, you must use itPackage Manager Consolecan be installed at the designated version. For example, the latest version of the jQuery kit is 1.6.1, but when your project hopes to install the version of jQuery 1.5.1, then you can enter the following instructions:
Install-Package jQuery -Version 1.5.1

If you want to update the existing installed kit, you can use it firstGet-Package -UpdatesGet all related update kits and versions, and then executeUpdate-PACKAGES <Kitz Name>can be updated automatically, as shown below:

Full use method can refer toNuGet DocswebsiteFinding and Installing a NuGet Package Using the Package Manager Consolefile description.

2. NuGet Package Explorer

Preset everythingNuGetkit comes fromNuGet Galleryand all the kits are open original code. If you want to know how the specific kits are made, what content contains, etc., download the kit to download the complete content further through Nuget Package Explorer. The following is the following is the following. Installation and usage. Nuget Package Explorer can be installed through the Cliconce Installer. There is a benefit to installing software through the Cliconce installation. As long as there is an update version, it will be updated immediately, and it will save the trouble of manual installation of update.

After installation, the Nuget Package Explorer icon will appear on the desktop. After the mouse double -click, the program will be turned on:

No matter what technology is learning, most people usually start with imitation, so we first use Nuget Package Explorer to downloadNuGet GalleryThe existing kit will come back and study. Open [File] / [Open from Feed …]

After searching through the keywords, find out the kit (ID) and specific versions we want to download. As shown in the figure below, you can see that there are 135 related kits to download after searching jquery keywords, and there are many IDs in the search results. There are many different versions like IDs that are the same kit.

After turning on the kit, you will see the summary information of many kits (Package Metadata) and the content of the kit. The

In addition to browsing the kit made by others, you can even modify the kit of others, customize it into the format and file content required by the company, and then publish the kit to the company’s website. Developers installed, used, and updated the NUGET kit of the company’s customized company.

The process of establishing a kit can be fromNuGet Docswebsite

UnitCreating Packagesfinds detailed teaching files.

3. NuGet.exe Command Line

Nuget.exe is a kit management tool under the command prompt. Its use is exactly the same as the Nuget Package Explorer. The difference is that this is the operation method under the command prompt word, which is convenient for you Packaging, installation, update, remove or automatically release kitNuGet Gallery, etc., please refer to in detailCommand Line Referencefile description.

Since Nuget.exe is an independent execution file, unlike the Nuget Package Explorer, you can automatically update the version through the Cliconce technology, so Nuget.exe provides a Update instruction.NuGet.exe updatecan automatically update the program, and after the updateNuGet.exeprogram will be backup into anotherNuGet.exe.oldFile, if there is a problem with the update process, you can still restore the old version, as shown below:

There are a lot of kits onNuGet Gallery, and users are not easy to finish at a glance. I just spent a few hours of review all the thousands of kits. The kit, but later I found that I was too greedy, and removed a lot of kits, from the originalSelectedwill becomeSea Selection, everyone will look at it! ^_^

Related connection

film teaching


Random Posts

VSAN News -IDC data shows that in the first half of 2017, VSAN picks up the global super -fusion architecture software market

java reading (FileRereader) or writing (FileWriter) contains Chinese file garbled problems

[phpmyadmin] ERROR 1045 (28000): Access Denied for User ‘root‘@‘localhost‘ (USING PASSWORD: Yes) solve PHPMYADMIN error 1045W

Android custom View “Custom Combination Control”

Sixth week-the chain queue of the self-built algorithm library of data structure Sailor