Hi,
After update nuget package in VS 2015 Update1 feed from Teamcity nuget server just shows packages that are not authored by TC. No problem with packages from nuget.org or from local folder.
Nuget Package Explorer application has no problem with this feed.
I had to uninstall and install older 3.3 version.
Any chance it will be fixed in 3.4.2?
TeamCity has a limited implementation of the nuget protocol, it only support the nuget v1 protocol, and there are bugs (like not supporting semver properly). The teamcity team has told us that they are not planning to fix any of these bugs and we are suggesting that folks move off teamcity servers and move to any of the other public free servers (including our own nuget.server).
At the same time, if you can provide as with a sample of what exactly is broken, we might be able to have a suggestion/interim fix until you move to another server.
@Lechus if you can share a fiddler trace from 3.4 + Team city for the packages that don't work, we might be able to to take care of it.
I'm tentatively putting in 3.4.2 with a strong chance of this being bumped out (due to timing) to another release
Hi @yishaigalatzer
Request:
GET http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?Id='Testing.Core' HTTP/1.1
Accept: application/atom+xml, application/xml
user-agent: NuGet Client V3/3.4.0.0 (Microsoft Windows NT 10.0.10240.0, VS Professional/14.0)
Host: teamcity.local:8080
Cookie: TCSESSIONID=2594F8763A1EE953FCEFA5DA80AB73DE
Accept-Encoding: gzip, deflate
Response:
HTTP/1.1 204 No Content
Thanks! Can you tell us exactly what action was this for? And also if you could paste the equivalent trace from 3.3
Open Manage nuget packages for Solution with selected our teamcity nuget server. AS I see from Fiddler Nuget client is asking for all installed packages. Even if package is from this TC nuget server the response is empty.
Then there is a generic call(?)
GET http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='net'&includePrerelease=true&$skip=0&$top=26 HTTP/1.1
Accept: application/atom+xml, application/xml
user-agent: NuGet Client V3/3.4.0.0 (Microsoft Windows NT 10.0.10240.0, VS Professional/14.0)
Host: teamcity.local:8080
Cookie: TCSESSIONID=2594F8763A1EE953FCEFA5DA80AB73DE
Accept-Encoding: gzip, deflate
And that returns just two packages - that are not built by TC.
Response (I left just one of two packages in response)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/">
<title type="text">Packages</title>
<id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Search()</id>
<updated>2016-04-07T09:49:44Z</updated>
<link rel="self" title="Packages" href="Packages"/>
<entry>
<id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='OneReturnedPackage',Version='1.1.1.1')</id>
<title type="text">OneReturnedPackage</title>
<summary type="text">The OneReturnedPackage deployment package, built on 06/04/2016</summary>
<updated>2016-04-06T16:37:01Z</updated>
<author>
<name>not TC author</name>
</author>
<link rel="edit" title="V2FeedPackage" href="Packages(Id='OneReturnedPackage',Version='1.1.1.1')"/>
<category term="NuGetGallery.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/zip" src="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/download/ProjectName/12865:id/OneReturnedPackage.1.1.1.1.nupkg"/>
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:ProjectUrl>http://example.com</d:ProjectUrl>
<d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion>
<d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
<d:Authors>not TC author</d:Authors>
<d:Created m:type="Edm.DateTime">2016-04-06T16:37:01.871</d:Created>
<d:LastEdited m:type="Edm.DateTime">2016-04-06T16:37:01.871</d:LastEdited>
<d:LicenseUrl>http://example.com</d:LicenseUrl>
<d:Copyright/>
<d:Version>1.1.1.1</d:Version>
<d:ReportAbuseUrl/>
<d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount>
<d:Description>The OneReturnedPackage deployment package, built on 06/04/2016</d:Description>
<d:LastUpdated m:type="Edm.DateTime">2016-04-06T16:37:01.871</d:LastUpdated>
<d:Published m:type="Edm.DateTime">2016-04-06T16:37:01.871</d:Published>
<d:LicenseNames/>
<d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion>
<d:LicenseReportUrl/>
<d:IconUrl/>
<d:PackageHash>some hash</d:PackageHash>
<d:Dependencies/>
<d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
<d:Title>OneReturnedPackage</d:Title>
<d:Summary>The OneReturnedPackage deployment package, built on 06/04/2016</d:Summary>
<d:Tags/>
<d:NormalizedVersion>1.1.1.1</d:NormalizedVersion>
<d:GalleryDetailsUrl>http://example.com</d:GalleryDetailsUrl>
<d:DownloadCount m:type="Edm.Int32">0</d:DownloadCount>
<d:PackageSize m:type="Edm.Int64">10128982</d:PackageSize>
<d:AtomEntityType>application/zip</d:AtomEntityType>
<d:ReleaseNotes/>
<d:Language/>
<d:Id>OneReturnedPackage</d:Id>
<d:MinClientVersion/>
</m:properties>
</entry>
</feed>
@yishaigalatzer
Version 3.3
Request for installed package:
GET http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='installedPackage' HTTP/1.1
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
User-Agent: NuGet Client V3/3.3.0.0 (Microsoft Windows NT 10.0.10240.0, VS Professional/14.0)
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Host: teamcity.local:8080
Accept-Encoding: gzip, deflate
Response is valid, there is very long content (entries for all package versions) :
HTTP/1.1 200 OK
<?xml version="1.0" encoding="utf-8" standalone="yes" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/"><title type="text">Packages</title><id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()</id><updated>2016-04-07T10:15:24Z</updated><link rel="self" title="Packages" href="Packages"/><entry><id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='InstalledPackage',Version='1.0.0.5')</id><title type="text">InstalledPackage</title><summary type="text">The InstalledPackage deployment package, built on 14/08/2015</summary><updated>2015-08-14T15:31:51Z</updated><author><name>Administrator</name></author><link rel="edit" title="V2FeedPackage" href="Packages(Id='InstalledPackage',Version='1.0.0.5')"/><category term="NuGetGallery.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><content type="application/zip" src="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/download/ProjName/474:id/InstalledPackage.1.0.0.5.nupkg"/><m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance><d:ProjectUrl>http://example.com</d:ProjectUrl><d:IsAbsoluteLatestVersion m:type="Edm.Boolean">false</d:IsAbsoluteLatestVersion><d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm><d:Authors>Administrator</d:Authors><d:Created m:type="Edm.DateTime">2015-08-14T15:31:51.574</d:Created><d:LastEdited m:type="Edm.DateTime">2015-08-14T15:31:51.574</d:LastEdited><d:LicenseUrl>http://example.com</d:LicenseUrl><d:Copyright></d:Copyright><d:Version>1.0.0.5</d:Version><d:ReportAbuseUrl></d:ReportAbuseUrl><d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount><d:Description>The InstalledPackage deployment package, built on 14/08/2015</d:Description><d:LastUpdated m:type="Edm.DateTime">2015-08-14T15:31:51.574</d:LastUpdated><d:Published
...
Valid response for installed package from TC nuget server:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/"><title type="text">Packages</title><id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()</id><updated>2016-04-07T10:15:25Z</updated><link rel="self" title="Packages" href="Packages"/><entry><id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='Testing.Core',Version='1.0.0.1')</id><title type="text">Testing.Core</title><summary type="text">An internal package - SpecificationContext class to provice base class for test classes. To be used in our applications. Use nUnit framework. Lechus</summary><updated>2016-03-02T12:27:26Z</updated><author><name>Image</name></author><link rel="edit" title="V2FeedPackage" href="Packages(Id='Testing.Core',Version='1.0.0.1')"/><category term="NuGetGallery.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><content type="application/zip" src="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/download/ProjNameReleaseBuildsCreateNuGetPackage/9711:id/Testing.Core.1.0.0.1.nupkg"/><m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance><d:ProjectUrl>http://www.co.uk</d:ProjectUrl><d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion><d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm><d:Authors>Image</d:Authors><d:Created m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:Created><d:LastEdited m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:LastEdited><d:LicenseUrl></d:LicenseUrl><d:Copyright>Copyright 2016</d:Copyright><d:Version>1.0.0.1</d:Version><d:ReportAbuseUrl></d:ReportAbuseUrl><d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount><d:Description>An internal package - SpecificationContext class to provice base class for test classes. To be used in our applications. Use nUnit framework. Lechus</d:Description><d:LastUpdated m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:LastUpdated><d:Published m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:Published><d:LicenseNames></d:LicenseNames><d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion><d:LicenseReportUrl></d:LicenseReportUrl><d:IconUrl>http://cdn.co.uk/ImageLogo.png</d:IconUrl><d:PackageHash>G072LIbl3xIAZ5+zhHrBr6lJgHbPSlp64O1OVemql++zdc9tLIir/D+FnZl45176YOYsecH260sdKnbXQKIUSg==</d:PackageHash><d:Dependencies>NUnit:2.6.4</d:Dependencies><d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease><d:Title>Testing.Core</d:Title><d:Summary>An internal package - SpecificationContext class to provice base class for test classes. To be used in our applications. Use nUnit framework. Lechus</d:Summary><d:Tags>Test, core, unit, nunit</d:Tags><d:NormalizedVersion>1.0.0.1</d:NormalizedVersion><d:GalleryDetailsUrl>http://www.co.uk</d:GalleryDetailsUrl><d:DownloadCount m:type="Edm.Int32">0</d:DownloadCount><d:PackageSize m:type="Edm.Int64">5468</d:PackageSize><d:AtomEntityType>application/zip</d:AtomEntityType><d:ReleaseNotes></d:ReleaseNotes><d:Language></d:Language><d:Id>Testing.Core</d:Id><d:MinClientVersion></d:MinClientVersion></m:properties></entry></feed>
Nuget 3.3 Request for all packages:
GET http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Search()?$filter=IsAbsoluteLatestVersion&$orderby=DownloadCount%20desc,Id&searchTerm=''&targetFramework='net45%7Cnet451'&includePrerelease=true HTTP/1.1
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
User-Agent: NuGet Client V3/3.3.0.0 (Microsoft Windows NT 10.0.10240.0, VS Professional/14.0)
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Host: teamcity.local:8080
Accept-Encoding: gzip, deflate
And it gots VALID response with ALL packages (here is just one entry):
HTTP/1.1 200 OK
Content-Length: 39639
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/">
<title type="text">Packages</title>
<id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Search()</id>
<updated>2016-04-07T10:15:24Z</updated>
<link rel="self" title="Packages" href="Packages"/>
<entry>
<id>http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='SomePackage.Testing.Core',Version='1.0.0.1')</id>
<title type="text">SomePackage.Testing.Core</title>
<summary type="text">An internal package - SpecificationContext class to provice base class for test classes. To be used in SomePackage applications. Use nUnit framework. Lechus</summary>
<updated>2016-03-02T12:27:26Z</updated>
<author>
<name>SomePackageMoney</name>
</author>
<link rel="edit" title="V2FeedPackage" href="Packages(Id='SomePackage.Testing.Core',Version='1.0.0.1')"/>
<category term="NuGetGallery.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/zip" src="http://teamcity.local:8080/guestAuth/app/nuget/v1/FeedService.svc/download/SomePackageNuggets_SomePackageTestingCore_2ReleaseBuildsCreateNuGetPackage/9711:id/SomePackage.Testing.Core.1.0.0.1.nupkg"/>
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:ProjectUrl>http://www.co.uk</d:ProjectUrl>
<d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion>
<d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
<d:Authors>SomePackageMoney</d:Authors>
<d:Created m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:Created>
<d:LastEdited m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:LastEdited>
<d:LicenseUrl/>
<d:Copyright>Copyright 2016</d:Copyright>
<d:Version>1.0.0.1</d:Version>
<d:ReportAbuseUrl/>
<d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount>
<d:Description>An internal package - SpecificationContext class to provice base class for test classes. To be used in SomePackage applications. Use nUnit framework. Lechus</d:Description>
<d:LastUpdated m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:LastUpdated>
<d:Published m:type="Edm.DateTime">2016-03-02T12:27:26.058</d:Published>
<d:LicenseNames/>
<d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion>
<d:LicenseReportUrl/>
<d:IconUrl>http://cdn.co.uk/SomePackageLogo.png</d:IconUrl>
<d:PackageHash>G072LIbl3xIAZ5+zhHrBr6lJgHbPSlp64O1OVemql++zdc9tLIir/D+FnZl45176YOYsecH260sdKnbXQKIUSg==</d:PackageHash>
<d:Dependencies>NUnit:2.6.4</d:Dependencies>
<d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
<d:Title>SomePackage.Testing.Core</d:Title>
<d:Summary>An internal package - SpecificationContext class to provice base class for test classes. To be used in SomePackage applications. Use nUnit framework. Lechus</d:Summary>
<d:Tags>Test, core, unit, nunit</d:Tags>
<d:NormalizedVersion>1.0.0.1</d:NormalizedVersion>
<d:GalleryDetailsUrl>http://www.co.uk</d:GalleryDetailsUrl>
<d:DownloadCount m:type="Edm.Int32">0</d:DownloadCount>
<d:PackageSize m:type="Edm.Int64">5468</d:PackageSize>
<d:AtomEntityType>application/zip</d:AtomEntityType>
<d:ReleaseNotes/>
<d:Language/>
<d:Id>SomePackage.Testing.Core</d:Id>
<d:MinClientVersion/>
</m:properties>
</entry>
</feed>
We think we got a fix for this. Can you please try the following private build?
https://www.myget.org/F/nuget-vsix/vsix/NuGet.0d421874-a3b2-4f67-b53a-ecfce878063b-3.4.2.821.vsix
Here is what I think the duplicate bug is - https://github.com/NuGet/Home/issues/2439
@Lechus ping
3.4.2 is now released, @Lechus please let us know if your issue is fixed.
If I don't hear from you by EOD tomorrow, we plan to close as fixed.
I am having the same issue where the latest Nuget Package Manager 3.2.4.830 is not able to query our Team City (9.1.6 build 37459) Nuget feed. I get the same 404 on a search query.
Dropping back to Nuget Package Manger 3.3.0.167 resolves the issue.
Let me know if there is any way I can help, I have experience in Visual Studio Extension development and can fork if necessary but do not know where the issue may have originated as I am not failure with the extension code base.
Package Manger Console:
[Team City Public] The V2 feed at 'http://10.0.1.22:8111/guestAuth/app/nuget/v1/FeedService.svc/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net452'&includePrerelease=false&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.
Request:
GET http://10.0.1.22:8111/guestAuth/app/nuget/v1/FeedService.svc/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net452'&includePrerelease=false&$skip=0&$top=26 HTTP/1.1
Accept: application/atom+xml, application/xml
user-agent: NuGet Client V3/3.4.2.0 (Microsoft Windows NT 10.0.10586.0, VS Professional/14.0)
Host: 10.0.1.22:8111
Cookie: TCSESSIONID=E8289D9FA4493AE478B957E965207B09
Accept-Encoding: gzip, deflate
Response:
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
DataServiceVersion: 1.0
Content-Type: application/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 12 Apr 2016 13:07:45 GMT
ec
<?xml version="1.0" encoding="utf-8" standalone="yes" ?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>NotFoundException</code><message lang="en-US">EdmEntitySet Search is not found</message></error>
0
@mhail first I think you mean you use 3.4.2 ?
Second what command are you using in the console? And can you share a fiddler trace of a working vs not working flow?
I am using the NuGet package Manger for Visual Studio 2015.
Attached are working Fiddler 4 session traces for 3.3.0.167
And not working 3.4.2.830
@mhail we are going to look into it today, but I wanted to add the feedback that TeamCity is using a very old and inefficient protocol, and from what we are hearing these is no plans to update it.
I would highly recommend moving off it to one of the many other possible private servers. Specifically we just released a new version of nuget.server that is a lot more efficient that previous versions.
Here are some links:
http://blog.nuget.org/20160113/Accelerate-your-NuGet.Server.html
http://docs.nuget.org/create/hosting-your-own-nuget-feeds
http://chris.eldredge.io/blog/2012/07/03/Speeding-Up-NuGet-Server/
@mhail it looks like you are using a nuget v1 feed. If you change your TeamCity feed to use v2 with teamcity.nuget.api.version=v2 are you able to query for packages using NuGet 3.4.2?
Also, are you using packages.config or project.json with your nuget projects?
I updated the internal property in the Team City Admin to v2 and it looks like every thing is working when calling FindPackagesById(). I am having another developer verify and will update once confirmed, but working on my end with 3.2.4.830.
@rrelyea doesn't feel like a docs issue. Let me know if you feel otherwise.
@karann-msft there has been a lot of confusion around this area. A short doc on dropping v1 support would help.
agreed. Teamcity should probably write about it :-)