nuget
This is an old revision of the document!
Table of Contents
NuGet
Commands
dotnet restore .\SomeProject.csproj | Restore NuGet packages by command line. |
dotnet list .\SomeProject.csproj package | List NuGet package dependencies of a project. |
dotnet list .\SomeProject.csproj package --include-transitive | List NuGet package dependencies of a project with transitive dependencies. |
dotnet list .\SomeSolution.sln package --include-transitive | List NuGet package dependencies of a solution with transitive dependencies. |
$pkgId = "newtonsoft.json" $version = "13.0.3" "https://api.nuget.org/v3-flatcontainer/$pkgId/$version/$pkgId.nuspec" | (Open URI in browser - Invoke-RestMethod does not seem to work). List NuGet package dependencies from a repo. Not sure if this actually works. |
dotnet nuget list source --format detailed | List the NuGet package sources. |
Package Cache Locations
%userprofile%\.nuget\packages
%userprofile%\AppData\Local\NuGet
nuget.1760569775.txt.gz · Last modified: 2025/10/15 23:09 by stephen