Nuget
A common mistake when trying to install the Devprime CLI is not having the default public nuget configuration in your source list. Before proceeding, make sure 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
-
Force install by indicating the nuget
dotnet tool update -g --add-source 'https://api.nuget.org/v3/index.json' --ignore-failed-sources Devprime.cli
-
Clear the local nuget cache
dotnet nuget locals all --clear
-
Check and fix the sources in the local Nuget.
dotnet nuget list source
The result should look something like the example below indicating 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, just enter its name
dotnet nuget remove source nuget.org
To add the public nuget font
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
NOTE: The existence of failed private urls can result in errors when using the nuget service.
To learn more:
Last modified August 20, 2024 (2f9802da)