Luk*_*ett 5 .net-core visual-studio-code
dotnet test在我第一次使用的新 netcore20 项目中,此恢复和构建以及失败的恢复部分。
我是第一次使用 Visual Studio Code。
"C:\Data\Git\PDQShockerRestAPI\src\PDQShockerRestAPIWebApp.UnitTests\PDQShockerRestAPIWebApp.UnitTests.csproj" (Restore target) (1) ->
(Restore target) ->
C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Unable to load the service index for source https://contoso-pdq.pkgs.visualstudio.com/_packaging/ContosoPDQNetFramework/nuget/v3/index.json.\r [C:\Data\Git\PDQShockerRestAPI\src\PDQShockerRestAPIWebApp.UnitTests\PDQShockerRestAPIWebApp.UnitTests.csproj]
C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Data\Git\PDQShockerRestAPI\src\PDQShockerRestAPIWebApp.UnitTests\PDQShockerRestAPIWebApp.UnitTests.csproj]
Run Code Online (Sandbox Code Playgroud)
我已将.nuget另一个解决方案中的文件夹复制/src/.nuget到此解决方案中,但它不起作用。
我的预感是 VS2017 可能是通过 IDE 自动进行身份验证的,而 VSCode 不是?
源在 VSTS 上。我需要下载并运行 VSTS 的 NuGet 身份验证帮助程序工具。
https://www.visualstudio.com/en-us/docs/package/nuget/auth-old
在针对我的工具运行该工具后,/src/.nuget/NuGet.config我会看到一个迷你登录浏览器窗口并登录到 VSTS。几秒钟后,它完成了,当我dotnet test再次尝试时,一切都很好。
PS C:\Data\Git\PDQShockerRestAPI\src\.nuget> ./VSS.NuGet.AuthHelper.exe -Config .\NuGet.Config
Getting new credentials for source:VSO Libraries Feed, scope:vso.packaging_write vso.drop_write
Run Code Online (Sandbox Code Playgroud)
有趣的是,我指定的文件没有进行任何更改NuGet.config..!
| 归档时间: |
|
| 查看次数: |
3090 次 |
| 最近记录: |