aspnet / dnx

OBSOLETE - see readme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dnu restore and Team City feed

dazinator opened this issue · comments

Team City is hosting our NuGet feed (V2 NuGet Compatible API)

When we do a Dnu restore, Dnu falls over with:


Response from http://[ourteamcity host]:81/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.IO.Compression'; is not a valid NuGet v2 service response.

This causes the entire restore process to fail.

Looking at the response in fiddler:

HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Set-Cookie: RememberMe=*****; Expires=Thu, 12-May-2016 14:22:47 GMT; Path=/; HttpOnly
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/atom+xml;charset=utf-8
Date: Thu, 28 Apr 2016 14:22:47 GMT

This is because the package is not found on the Team City feed, it's on another feed (configured in NuGet.config)

However Dnu falls over as it doesn't like the response, and doesn't attempt to resolve the package by querying the next feed = build fails.

What do I need to do to solve this issue? Is dnu not compatible with Team City NuGet feeds?

We're not planning to make any changes to dnvm/dnx/dnu as we are retiring dnx in RC2.

I do understand that, but that's not very helpful :) given VS has not switched to dotnet cli yet, and our RC1 application is going to production, we are stuck with the dnx tool chain at present, so I really need to find some solution.

I eventually found this: http://stackoverflow.com/questions/32033532/asp-net-5-failing-to-install-asp-net-5-nuget-package which lead me to the actual solution to this problem:

You need to use dnu restore --ignore-failed-sources.

@dazinator Happy you found the workaround. The trouble with that option is you won't know where your package is coming from sometimes (i.e. you're expecting to get a package from a certain feed, but you end up getting another version from another feed.)