0

I developed a (non-public) nuget-tool. The installation was very easy:

dotnet tool install dotnet-mytoolname -g

My colleagues will also install these tool by the command.

In future I will release new versions of dotnet-mytoolname. Consumers will update it easy with dotnet.exe.

Now my problem: If a developer runs an outdated version of that tool then I will hint it in console output (something like "a newer version is available"). How I can check with dotnet.exe if a new version is available?

The command below would do it but only for nuget.org. But our nuget-tool is not hosted on nuget.org but on a private azure-devops server.

dotnet tools search dotnet-mytoolname

The nuget-tool dotnet-mytoolname is a C# console-project.

Have you any ideas how I can check within that project if a newer version is available on azure-devops?

Alois
  • 361
  • 2
  • 18

1 Answers1

0

Thank you DavidG. Posting your suggestions as an answer to help other community members.

Installing dotnet outdated application will help you in resolving your issue install .Net core and run the following command

dotnet tool install --global dotnet-outdated-tool

Here is how it will use

Usage: dotnet outdated [options] <Path>

Arguments:
  Path                                       The path to a .sln, .csproj or .fsproj file, or to a directory containing a .NET Core solution/project. If none is specified, the current directory will be used.

Options:
  --version                                  Show version information
  -?|-h|--help                               Show help information
  -i|--include-auto-references               Specifies whether to include auto-referenced packages.
  -pre|--pre-release <PRERELEASE>            Specifies whether to look for pre-release versions of packages. Possible values: Auto (default), Always or Never.
  -vl|--version-lock <VERSION_LOCK>          Specifies whether the package should be locked to the current Major or Minor version. Possible values: None (default), Major or Minor.
  -t|--transitive                            Specifies whether it should detect transitive dependencies.
  -td|--transitive-depth <TRANSITIVE_DEPTH>  Defines how many levels deep transitive dependencies should be analyzed. Integer value (default = 1)
  -u|--upgrade[:<TYPE>]                      Specifies whether outdated packages should be upgraded. Possible values for <TYPE> is Auto (default) or Prompt.
  -f|--fail-on-updates                       Specifies whether it should return a non-zero exit code when updates are found.
  -inc|--include <FILTER_INCLUDE>            Specifies to only look at packages where the name contains the provided string. Culture and case insensitive. If provided multiple times, a single match is enough to include a package.
  -exc|--exclude <FILTER_EXCLUDE>            Specifies to only look at packages where the name does not contain the provided string. Culture and case insensitive. If provided multiple times, a single match is enough to exclude a package.
  -o|--output <OUTPUT_FILENAME>              Specifies the filename for a generated report. (Use the -of|--output-format option to specify the format. JSON by default.)
  -of|--output-format <OUTPUT_FILE_FORMAT>   Specifies the output format for the generated report. Possible values: json (default) or csv.
  -ot|--older-than <NUMBER_OF_DAYS>          Only include package versions that are older than the specified number of days.

Check this link which will give you complete information about dotnet outdated packages.

SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15
  • Thank you for the summary but that tool will currently not help because it only can check local tools but not global installed ones (see https://github.com/dotnet-outdated/dotnet-outdated/issues/32). – Alois Aug 09 '21 at 07:07