NuGet packages only showing up as pre-release

I have setup a TeamCity 7.0.3 server to publish the assembly builds as NuGet packages. I am using TeamCity's built-in NuGet package hosting feature. The problem I am having is that the package is not showing when I set the NuGet package manager in Visual Studio to Stable only. It does appear when I change this to 'Include Prerelease'. The problem is that I don't believe I am doing anything to trigger it to be treated as a Prerelease (after reading: http://docs.nuget.org/docs/reference/versioning#Prerelease_Versions).

My NuGet package spec is as follows:

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>PackageName</id>
    <version>1.0.0</version>
    <authors>Me</authors>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>My description.</description>
  </metadata>
  <files>
    <file src="Tools\MyProgram\bin\Debug\*.exe" target="lib\net40" />
 <file src="Tools\ MyProgram\bin\Debug\*.dll" target="lib\net40" />
  </files>
</package>



In the NuGet Pack build runner, I have put the version number as %build.number%.0.0. This creates a version number in the format x.y.z where x is incremented by one for each build.

Can anyone tell me why or how I can publish the package as a stable release?
8 comments
Comment actions Permalink

Hi,

If you have the version like 1.2.3 it must be treated as stable.
I checked the feed with latest NuGet 1.8 in Visual Studio.
It do shows the package both for stable and prerelease sections.

The behaviour seems ok as they call prerelease section 'Include prerelease'.
I'd say this means stable + prerelease.

What version of NuGet do you use?
Please also check what version of NuGet plugin to you use (in Administration | Plugins).

0
Comment actions Permalink

I have configured the NuGet packer build runner to use the Version number as: %build.number%.0.0. This generates a NuGet package version number in the format x.y.z where x is incremented for each build and thus should be exactly what is expected for a stable version of the package.

However, this is still producing NuGet packages that only appear in the Prerelease list. The packages do not appear in the Stable list.

0
Comment actions Permalink

What version of NuGet do you use?
Please also check what version of NuGet plugin in TeamCity to you use (in Administration | Plugins).



Please include dump of packages responces.
To do it, open
http://teamcity_url/app/nuget/v1/FeedService.svc/Packages()
than open
http://teamcity_url/app/nuget/v1/FeedService.svc/Packages()?$filter=IsLatestVersion

than open
http://teamcity_url/app/nuget/v1/FeedService.svc/Packages()?$filter=IsAbsoluteLatestVersion



As the result you should get 3 xml files. Please attach them.
0
Comment actions Permalink

The NuGet tool version I am using in TeamCity is: 1.8.40002. The NuGet plugin version used in TeamCity is 21424; just to clarify, the line item for this is named 'Provides support for NuGet package manager'.

I have also attached a zip file containing the output files created (obviously the server name has been changed to a fake one).

Additionally, I have also attached the .nuspec file being used to define the NuGet package.



Attachment(s):
NuGet packages.zip
package.nuspec.zip
0
Comment actions Permalink

What version of NuGet Addin you use in Visual Studio?

0
Comment actions Permalink

NuGet Package Manager v1.7.30402.9028

0
Comment actions Permalink

NuGet 1.7 is not supported to work with TeamCity provided NuGet Feed.
Please take a look at http://youtrack.jetbrains.com/issue/TW-21011

The only workaround for you is to install NuGet 2.0  (or 1.8) into Visual Studio.
Please let me know if that helps

0
Comment actions Permalink

I have now upgraded NuGet Package Manager to the latest version (2.0.30619.9119) which has resolved the problem. Thank you very much.

0

Please sign in to leave a comment.