Unhandled error on request from TeamCity nuget feed, unvalid version string

stineek's Avatar


19 Apr, 2017 11:47 AM

A package with the wrong version number has gotten into the nuget feed that we set up on our TeamCity server, and is now causing issues when creating a new release.

I don't know how to clean out the TeamCity nuget feed. We fixed the version string on our packages, so the future packages will get the proper number. This error however, persists.

I am able to release by manually typing in the package number.

Here is the error I get when I click "Search" to see what packages were recently built:

System.ArgumentException: '1.5--development' is not a valid version string.
Parameter name: version
   at NuGet.SemanticVersion.Parse(String version)
   at NuGet.DataServicePackage.NuGet.IPackageName.get_Version()
   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at Octopus.Core.Packages.ExternalNuGetFeedAdapter.<GetVersions>d__7.MoveNext() in Y:\work\refs\tags\3.2.24\source\Octopus.Core\Packages\ExternalNuGetFeedAdapter.cs:line 51
   at System.Linq.Enumerable.<SkipIterator>d__30`1.MoveNext()
   at System.Linq.Enumerable.<TakeIterator>d__24`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Octopus.Server.Web.Api.Actions.PackageSearchAction.Search(String feedId, String packageId, Boolean partialMatch, Boolean includeMultipleVersions, Boolean includeNotes, Boolean includePreRelease, Int32 take, IVersionSpec versionRange, Regex preReleaseTag) in Y:\work\refs\tags\3.2.24\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 70
   at Octopus.Server.Web.Api.Actions.PackageSearchAction.Execute() in Y:\work\refs\tags\3.2.24\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 55
   at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.2.24\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.2.24\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

  1. 1 Posted by stineek on 19 Apr, 2017 11:49 AM

    stineek's Avatar

    Octopus version 3.2.24
    TeamCity version 10.0.5 (build 42677)

  2. 2 Posted by Vanessa Love on 20 Apr, 2017 04:56 AM

    Vanessa Love's Avatar


    Thanks for getting in touch! This file will have to be deleted from your TeamCity feed. In current versions you should be able to complete this task by deleting the build that created the artifact.
    This function is available via the Actions drop down, and selecting Remove. If that option is not available to you for some reason there is quite a thread over on StackOverflow which gives various ways to delete a package from their feed:

    Hope this helps! Let me know how this goes.

  3. Paul Stovell closed this discussion on 25 Jul, 2017 08:57 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac