A dotnet tool that updates packages for all solutions in a directory.
See Milestones for release notes.
https://nuget.org/packages/PackageUpdate/
Ensure dotnet CLI is installed.
Install PackageUpdate
dotnet tool install -g PackageUpdatepackageupdate C:\Code\TargetDirectoryIf no directory is passed the current directory will be used.
packageupdate C:\Code\TargetDirectorypackageupdate -t C:\Code\TargetDirectorypackageupdate --target-directory C:\Code\TargetDirectoryThe package name to update. If not specified, all packages will be updated.
packageupdate -p packageNamepackageupdate --package packageNameBuild the solution after the update
packageupdate -bpackageupdate --build- Recursively scan the target directory for all directories containing a
.slnfile. - Perform a dotnet restore on the directory.
- Recursively scan the directory for
*.csprojfiles. - Call dotnet list package to get the list of pending packages.
- Call dotnet add package with the package and version.
When processing multiple directories, it is sometimes desirable to "always ignore" certain directories. This can be done by adding a PackageUpdateIgnores environment variable:
setx PackageUpdateIgnores "AspNetCore,EntityFrameworkCore"
The value is comma separated.
Use context-menu.reg to add PackageUpdate to the Windows Explorer context menu.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Shell]
@="none"
[HKEY_CLASSES_ROOT\Directory\shell\packageupdate]
"MUIVerb"="run packageupdate"
"Position"="bottom"
[HKEY_CLASSES_ROOT\Directory\Background\shell\packageupdate]
"MUIVerb"="run packageupdate"
"Position"="bottom"
[HKEY_CLASSES_ROOT\Directory\shell\packageupdate\command]
@="cmd.exe /c packageupdate \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\packageupdate\command]
@="cmd.exe /c packageupdate \"%V\""To use authenticated feed, add the packageSourceCredentials to the global nuget config:
<packageSourceCredentials>
<feedName>
<add key="Username" value="username" />
<add key="ClearTextPassword" value="api key" />
</feedName>
</packageSourceCredentials>Update by Andy Miranda from The Noun Project.