How To Instal Nuget Package
Packet Manager Panel
The NuGet Parcel Director Console is built into Visual Studio on Windows version 2022 and after. It is non included with Visual Studio for Mac or Visual Studio Code.
Download and Installation
In Visual Studio 2022, NuGet and the NuGet Parcel Manager are automatically installed when you select any .Net-related workloads; y'all tin also install information technology individually by checking the Private components > Code tools > NuGet packet manager option in the Visual Studio 2022 installer.
- You can use NuGet PowerShell commands to find, install, uninstall, and update NuGet packages.
- To open the console in Visual Studio, go to the main card and select Tools > NuGet Package Managing director > Package Manager Console command.
Past default, console commands operate against a specific bundle source and project equally set in the control at the peak of the window.
Install Package
To install a package, utilise Install-Packet command.
Examples
The following command adds the Z.EntityFramework.Classic parcel to the default projection as specified in the console's project selector.
PM> Install-Package Z.EntityFramework.Classic The following command adds the Z.EntityFramework.Archetype packet to a project named EFDemo that is not the default
PM> Install-Package Z.EntityFramework.Classic -ProjectName EFDemo When you install a package, information technology performs the following actions.
- The console displays applicable license terms in its window with an unsaid agreement.
- If you practice not hold to the terms, you should uninstall the package immediately.
- A reference to the package is added to the project file and appears in Solution Explorer under the References node.
Uninstall Package
To uninstall a packet, use Uninstall-Package command.
Examples
The following command uninstalls the Elmah package from the default project.
The following command uninstalls the Elmah package and all its unused dependencies.
Uninstall-Parcel Elmah -RemoveDependencies The following command uninstalls the Elmah package even if some other parcel depends on it.
Uninstall-Package Elmah -Force When you lot uninstall a packet, it performs the following actions.
- Removes references to the packet from the projection and references no longer announced in Solution Explorer.
- Reverses any changes fabricated to app.config or web.config when the packet was installed.
- Removes previously-installed dependencies if no remaining packages use those dependencies.
Source: https://nuget-tutorial.net/en/tutorial/100009/package-manager-console
Posted by: eatonalikee.blogspot.com

0 Response to "How To Instal Nuget Package"
Post a Comment