]> Using TFS 2018 NuGet feeds with Visual Studio 2013 🌐:aligrant.com

Using TFS 2018 NuGet feeds with Visual Studio 2013

Alastair Grant | Monday 2 April 2018

BizTalk Server 2013 R2 solutions can only be developed from Visual Studio 2013, which is slightly annoying if you're working against an older platform.  Still, Visual Studio 2013 is fairly well rounded.  Recently I have been trying to make use of some NuGet packages that have been published to an on-prem TFS 2018 feed.  TFS package management publishes feeds that it hosts itself, without the need of a dedicated NuGet server.

The problem I was getting was when I used the NuGet Package Manager it would hang when retrieving the list of packages.  If I clicked on cancel I would see a (404) Not Found error message.  Using the package manager console got similar results:

Install-Package : An error occurred while loading packages from 'https://xxxx/nuget/v3/index.json': The remote server returned an error: (404) Not Found.

Checking the URL in newer version of Visual Studio showed that it worked fine.  Some incompatibility?  Yes, Visual Studio 2013 supports V2 of NuGet protocol, and TFS publishes by default a V3 feed.  Not to worry though as a V2 feed is there, you just need to know what to change.

The URL provided by default will be in the form of: https://{server}/{collection}/_packaging/{project}/nuget/v3/index.json.  The trick is to replace /v3/index.json with /v2  Note, no index.json on the end either.  Add this revised URL into your Visual Studio NuGet sources list and your problems should go away.

 

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.