J'essaie d'installer le dotnet-ef
outil via le dotnet-cli.
La commande que j'entre: dotnet tool install --global dotnet-ef
Je me donne l'erreur suivante:
The tool package could not be restored.
Tool 'dotnet-ef' 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 Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
J'utilise dotnet 3.0, je crois que je n'ai pas eu ce problème sur MacOS, j'essaie maintenant d'exécuter la même commande sur ma machine Windows 10 et cela me donne cette erreur.
Quelques informations en utilisant dotnet --info
commande:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Je l'ai testé et cela a bien fonctionné. Spécifiez le numéro de version.
dotnet tool install --global dotnet-ef --version 3.0.0
J'ai reçu ce message d'erreur, mais lorsque j'ai inspecté de près toutes les erreurs, j'ai également eu:
Response status code does not indicate success: 407 (Proxy Authorization Required).
La désactivation du proxy lors de l'exécution de la commande a résolu le problème.