TFS Build Agent在以下版本的Nuget Restore上失败:.Net Core + VS 2017 +专用TFS Feed [英] TFS Build Agent failed on Nuget Restore for: .Net Core + VS 2017 + private TFS Feed

查看:98
本文介绍了TFS Build Agent在以下版本的Nuget Restore上失败:.Net Core + VS 2017 +专用TFS Feed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有:一个.NET Core应用程序,针对VS 2017进行了修改,并且使用了TFS Feed。
VS 2015 中时, NuGet还原工作正常。
现在使用 VS 2017 NuGet还原,返回无法加载msbuild Toolset ... 无法加载文件或程序集'Microsoft.Build,Version = 14.0.0.0

I have: a .NET Core App, modified for VS 2017 and consuming a TFS Feed. When it was in VS 2015, NuGet restore was working fine. Now using VS 2017, NuGet restore it doesn't work returning a Failed to load msbuild Toolset ... Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0

我还尝试使用 dotnet restore 并得到 401(未经授权)的响应。

I also try to use dotnet restore and I got a 401 (Unauthorized) response.

显然, NuGet恢复是首选方法,因为它会自动为我们认证,以便使用TFS Feed,但是似乎无法识别VS 2017。

Apparently NuGet restore is the preferred way to do it, since it automatically authenticated for us, in order to use TFS Feed, but it seems to don't recognize VS 2017.

抱歉,造成混乱,我忘了提到问题是使用CI / CD Visual Studio Team Services / Build。在我的PC上,它运行良好,因为我安装了NuGet 4(VS 2017随附)...但是在线可用的NuGet版本(可以访问私人供稿)是:3.3和3.5

Sorry for the confusion, I forgot to mention that the problem is using CI/CD Visual Studio Team Services / Build. In my PC, it works fine because I had NuGet 4 (it come with VS 2017)... but online the NuGet versions available (with access to private feed) are: 3.3 and 3.5

按照@ Cece-MSFT的建议将nuget 4.0添加到版本中之后,我仍然遇到错误,但是没有太多详情。参见屏幕截图:

After I added the nuget 4.0 to the build as @Cece-MSFT suggested, I still getting an error but without much detail. see screenshot:

推荐答案

最后,进行了一些升级, 2种解决方案,如何解决:

Finally, some upgrades and there are 2 options, how to solve this:


  1. 代替使用NuGet v3.3和v3.5 ...现在支持NuGet v4.0


  1. 最喜欢的是使用NuGet Restore版本v1。*,现在我可以选择选择自己的VSTS Feed 。 ..所以我不再需要NuGet.config文件。

  1. And my Favorite, It's to use a NuGet Restore version v1.*, and now I have the option to select my own VSTS Feed... so I don't need the NuGet.config file anymore.

这篇关于TFS Build Agent在以下版本的Nuget Restore上失败:.Net Core + VS 2017 +专用TFS Feed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆