我无法从asp核心Web应用程序(RC2)中的Visual Studio Team Services提要安装/还原nuget程序包.我收到以下信息:
I am unable to install/restore nuget packages from a Visual Studio Team Services feed in an asp core web application (RC2). I receive the following:
错误:响应状态代码不指示成功:401 (未经授权).
error: Response status code does not indicate success: 401 (Unauthorized).
我正在运行Visual Studio Community 2015 Update 2和nuget版本3.4.4.我可以从其他其他项目类型的Feed中安装/恢复软件包.
I am running Visual Studio Community 2015 Update 2 and nuget version 3.4.4. I am able to install/restore packages from this feed in other project types.
我需要做其他事情来传递我的asp核心网络应用程序的凭据吗?
Do I need to do something else to pass my credentials for an asp core web app?
复制步骤:
从团队服务"包选项卡中,选择连接到源"并复制NuGet包源URL
From Team Services package tab I select "Connect to Feed" and copy the NuGet package source URL
在Visual Studio中->工具-> NuGet程序包管理器->程序包管理器设置->程序包源,并从vso添加供稿网址
In visual studio -> Tools -> NuGet Package Manager -> Package Manager settings -> Package sources and add the feed url from vso
然后从我的ASP.NET Core Web应用程序(.NET Framework)项目中右键单击引用->管理NuGet包 ->从程序包来源"中选择我的提要(列出了程序包)->单击以安装
Then from my ASP.NET Core Web Application (.NET Framework) project right click references -> Manage NuGet Packages -> Select my feed from Package source (packages are listed) -> Click to install
在输出中:
Installing NuGet package xxxxx Successfully installed xxxxx to WebApplication1 ========== Finished ==========然后它将尝试恢复我得到的软件包:
Then it will try to restore the package at which point I get:
error: Response status code does not indicate success: 401 (Unauthorized). error: Failed to retrieve information from remote source以及内部Web项目引用-程序包中带有警告图标-NU1001无法解析依赖项xxxxx
And inside web project references - package has warning icon - NU1001 The dependency xxxxx could not be resolved
推荐答案我可以在您的身边重现您的问题,以下是我用来还原软件包的解决方法:
I can reproduce your issue at my side and following is the workaround I use to restore the packages:
更多推荐
来自Visual Studio Team Services的未经授权的nuget程序包,使用asp.net core rc2
发布评论