Skip to content

Latest commit

 

History

History
135 lines (88 loc) · 3.81 KB

readme.md

File metadata and controls

135 lines (88 loc) · 3.81 KB

PackageUpdate

Build status NuGet Status

A dotnet tool that updates packages for all solutions in a directory.

See Milestones for release notes.

NuGet package

https://nuget.org/packages/PackageUpdate/

Installation

Ensure dotnet CLI is installed.

Install PackageUpdate

dotnet tool install -g PackageUpdate

Usage

packageupdate C:\Code\TargetDirectory

If no directory is passed the current directory will be used.

Arguments

Target Directory

packageupdate C:\Code\TargetDirectory
packageupdate -t C:\Code\TargetDirectory
packageupdate --target-directory C:\Code\TargetDirectory

Package

The package name to update. If not specified, all packages will be updated.

packageupdate -p packageName
packageupdate --package packageName

Behavior

  • Recursively scan the target directory for all directories containing a .sln file.
  • Perform a dotnet restore on the directory.
  • Recursively scan the directory for *.csproj files.
  • Call dotnet list package to get the list of pending packages.
  • Call dotnet add package with the package and version.

PackageUpdateIgnores

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.

Add to Windows Explorer

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\""

snippet source | anchor

Authenticated feed

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>

Icon

Update by Andy Miranda from The Noun Project.