这个问题是关于Visual Studio团队业务的不断整合功能,特别是在自动构建。.NET核心的NuGet还原失败,私人的NuGet饲料(VSTS CI构建)
我已经成立了一个生成定义建立我的.NET的核心MVC应用程序。
它是使用.NET的核心v1和编制针对.NET框架4.5.2。
我在这里跟着指示:
https://www.visualstudio.com/en-us/docs/build/apps/aspnet/ci/build-aspnet-core
我有一个私人的NuGet饲料中VSTS 这里设置是将程序包料源的命令:
Sources Add -Name "CiiDLFeed" -UserName "<username>" -Password "<password>" -ConfigFile $(Build.SourcesDirectory)/Nuget.config -Source https://mycompany.pkgs.visualstudio.com/_packaging/DLFeed/nuget/v3/index.json
我收到的错误:
error: Unable to load the service index for source https://mycompany.pkgs.visualstudio.com/_packaging/DLFeed/nuget/v3/index.json . error: Password decryption is not supported on .NET Core for this platform. The following feed uses an encrypted password: 'CiiDLFeed'. You can use a clear text password as a workaround.
针对这个问题,我补充说:“-StorePasswordInClearText”参数来的NuGet源添加命令:
Sources Add -Name "CiiDLFeed" -UserName "<username>" -Password "<password>" -ConfigFile $(Build.SourcesDirectory)/Nuget.config -Source https://mycompany.pkgs.visualstudio.com/_packaging/DLFeed/nuget/v3/index.json -StorePasswordInClearText
现在,我得到一个401错误:
error: Unable to load the service index for source https://mycompany.pkgs.visualstudio.com/_packaging/DLFeed/nuget/v3/index.json . error: Response status code does not indicate success: 401 (Unauthorized).
我使用的是完全相同的凭据在一个单独的构建定义工作正常,访问相同的Nuget饲料(一个.NET Web窗体应用程序),所以它不应该给我一个401.
我也试图简单地引用库DLL而不是NuGet打包在一个私人饲料,但似乎是没有牛逼可能与.NET的核心:
.NET core projects only support referencing .NET framework assemblies in this release. To reference other assemblies, they need to be included in a NuGet package and reference that package.
尝试使用V2为feed地址。我发现v3并不总是可靠的 – trailmax
@trailmax我仍然遇到'v2'的401错误。感谢您的建议 –
您是否使用实际密码或个人访问令牌作为密码? – trailmax