0

所以我有一个发布到 nuget的dotnet 模板,但只有在使用如下版本运行 install 命令时才会安装它:当我在没有版本的情况下运行安装命令时,它给了我一个未经授权的 401。我需要将某种设置添加到我的 csproj 中吗?我 99% 我以前在没有版本的情况下做过这个,它运行得很好。dotnet new --install Foundation.Api::0.3.0dotnet new --install Foundation.Api

这是完整的错误:

  Determining projects to restore...
C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp1.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]
  Retrying 'FindPackagesByIdAsync' for source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'.
  Response status code does not indicate success: 401 (Unauthorized).
  Retrying 'FindPackagesByIdAsync' for source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'.
  Response status code does not indicate success: 401 (Unauthorized).
C:\Program Files\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Failed to retrieve information about 'Foundation.Api' from remote source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'. [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]
C:\Program Files\dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   Response status code does not indicate success: 401 (Unauthorized). [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]
4

0 回答 0