Nuget

Nuget is the platform for package management in the .NET SDK and used for the installation of the Devprime CLI.

A common mistake when trying to install the Devprime CLI is not having the default public nuget configuration in your list of sources. Before proceeding, confirm that you have the most up-to-date version of the .NET SDK (Windows, Linux, Mac).
dotnet --version

error NU1101: Unable to find package Devprime.cli. No packages exist with this id in source(s): C:\Program Files\dotnet\sdk\NuGetFallbackFolder, Microsoft Visual Studio Offline Packages
Tool 'Devprime.cli' failed to update due to the following:
The tool package could not be restored.
Tool 'Devprime.cli' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
  1. Force install by displaying the nuget
    dotnet tool update -g --add-source 'https://api.nuget.org/v3/index.json' --ignore-failed-sources Devprime.cli

  2. Clear the local nuget cache
    dotnet nuget locals all --clear

  3. Check and fix the sources in the local Nuget.
    dotnet nuget list source

The result should look something like the example below setting the Nuget Source as ‘Enabled’.

Registered Sources:
  1.  nuget.org [Enabled]
      https://api.nuget.org/v3/index.json
  2.  Microsoft Visual Studio Offline Packages [Enabled]
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

To remove a source, simply enter its name
dotnet nuget remove source nuget.org

To add the public nuget source
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org

NOTE: The existence of faulty private urls may result in errors when using the nuget service.

To learn more:

Last modified November 12, 2023 (8e3b4c7e)