Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 error on 'Illegal' version string #189

Open
icarr-fsg opened this issue Apr 26, 2017 · 3 comments
Open

500 error on 'Illegal' version string #189

icarr-fsg opened this issue Apr 26, 2017 · 3 comments

Comments

@icarr-fsg
Copy link

Attempting to restore a solution which references swashbuckle.aspnetcore causes a 500 error to be returned from klondike. This aborts the Visual studio build process requiring the Klondike package source to be removed to continue.

The problem appears to relate to a version of this package with a tag: 1.0.0--rc1 (Note double hyphen)

The failing URL is:

http://nuget-klondike:8080/api/odata/FindPackagesById()?id=%27Swashbuckle.AspNetCore%27

Stack trace:

2017-04-26 14:40:19,593 ERROR 65 UnhandledExceptionLogger HandleAsync Unhandled exception: System.ArgumentException: '1.0.0--rc1' is not a valid version string.
Parameter name: version
System.ArgumentException: '1.0.0--rc1' is not a valid version string.
Parameter name: version
at NuGet.SemanticVersion.Parse(String version)
at NuGet.DataServicePackage.NuGet.IPackageName.get_Version()
at NuGet.PackageEqualityComparer.<.cctor>b__1(IPackageName x)
at System.Linq.Set1.InternalGetHashCode(TElement value) at System.Linq.Set1.Find(TElement value, Boolean add)
at System.Linq.Enumerable.d__661.MoveNext() at System.Linq.Enumerable.<CastIterator>d__941.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.d__1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
...

@icarr-fsg
Copy link
Author

Note: the project references 1.0.0 (not 1.0.0--rc1) and I can't find any other reference to the 'invalid' version.

@m-wilczynski
Copy link

For posteriority: Klondike seems to not support new versions of NuGet which is the root cause for many versioning issues (due to support for .NET Standard 2.0, semantic versioning etc.).

@mkurz01
Copy link

mkurz01 commented Apr 2, 2020

Had this error, too.
This works:
NuGet.exe install Swashbuckle.AspNetCore -Source https://packages.nuget.org/v1/FeedService.svc/
This works not:
NuGet.exe install Swashbuckle.AspNetCore -Source http://localhost:8080/api/odata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants