Visual studio 未找到源提供未授权错误401和404的dotnet add程序包
我们正在更新dotnet应用程序中的nuget软件包,使用来自Azure Devops中的私有源的dotnet add软件包“package name”。 最近我们更新到了.net 5.0.1(我不确定它是否与该问题有关。) 但现在,在运行上述命令时,本地计算机和azure piplelines中都会出现错误。 我尝试了--interactive选项,并刷新了PAT中的包等Visual studio 未找到源提供未授权错误401和404的dotnet add程序包,visual-studio,azure-devops,nuget-package,.net-5,Visual Studio,Azure Devops,Nuget Package,.net 5,我们正在更新dotnet应用程序中的nuget软件包,使用来自Azure Devops中的私有源的dotnet add软件包“package name”。 最近我们更新到了.net 5.0.1(我不确定它是否与该问题有关。) 但现在,在运行上述命令时,本地计算机和azure piplelines中都会出现错误。 我尝试了--interactive选项,并刷新了PAT中的包等 command dotnet add "csprojFile" package "mypac
command dotnet add "csprojFile" package "mypackageName"
Determining projects to restore...
Writing C:\Users\SirajUrRahman\AppData\Local\Temp\tmpD8BD.tmp
info : Adding PackageReference for package 'my package' into project '.\my csproj'.
info : GET https://api.nuget.org/v3/registration5-gz-semver2/mypackageName/index.json
info : NotFound https://api.nuget.org/v3/registration5-gz-semver2/mypackageName/index.json 889ms
error: Unable to load the service index for source https://pkgs.dev.azure.com/myorganization/_packaging/Feed/nuget/v3/index.json.
error: Response status code does not indicate success: 401 (Unauthorized).
Usage: NuGet.CommandLine.XPlat.dll package add [options]
Options:
-h|--help Show help information
--force-english-output Forces the application to run using an invariant, English-based culture.
--package Id of the package to be added.
--version Version of the package to be added.
-d|--dg-file Path to the dependency graph file to be used to restore preview and compatibility check.
-p|--project Path to the project file.
-f|--framework Frameworks for which the package reference should be added.
-n|--no-restore Do not perform restore preview and compatibility check. The added package reference will be unconditional.
-s|--source Specifies NuGet package sources to use during the restore.
--package-directory Directory to restore packages in.
--interactive Allow the command to block and require manual action for operations like authentication.
--prerelease Allows prerelease packages to be installed.
谢谢你的帮助。
如果需要,请随时询问任何问题。此问题与.net 5有关,并且已经在github上为其创建了一个bug。以下是该问题的链接 此问题与.net 5有关,并且已经在github上为其创建了一个bug。下面是该问题的链接 您好,感谢分享,您可以,它可以帮助其他社区成员获得相同的问题,我们可以存档此线程,谢谢。您好,感谢分享,您可以,它可以帮助其他社区成员获得相同的问题,我们可以存档此线程,谢谢。