Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error while parsing <dependency id="Newtonsoft.Json" version="*" /> #2266
Paket version 4.5.0
<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> <metadata> <id>JWT</id> <version>2.3.1</version> <authors>John Sheehan, Michael Lehenbauer, Alexander Batishchev</authors> <owners>johnsheehan, devinrader, abatishchev</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <licenseUrl>https://creativecommons.org/publicdomain/zero/1.0/</licenseUrl> <projectUrl>https://github.com/jwt-dotnet/jwt</projectUrl> <description>Jwt.Net, a JWT (JSON Web Token) implementation for .NET</description> <copyright>Public Domain</copyright> <language>en-US</language> <tags>jwt json</tags> <dependencies> <dependency id="Newtonsoft.Json" version="*" /> </dependencies> </metadata> </package>
Please provide the steps required to reproduce the problem
If possible then please create a git repository with a repro sample or attach a zip to the issue.
I'm not sure if this is a nuspec authoring error or a paket error.
Reading the nuspec/nuget/dotnet docs, I can't find any references to using a wildcard without preceding numbers.
Also, JWT v2.3.1 seems to be no longer available on NuGet, and the next version 2.3.2 does have a version specified for the dependency.
However, all previous beta and alpha versions - from 2.0.0-beta2 up to 2.3.0-beta - still have the bogus dependency, which means Nuget.org does technically allow it.
In version 2.0.0-beta2, where the offending nuspec line first appeared, it had no "version" attribute at all, rather than an asterisk. This means that the asterisk was added during packing. Considering the lack of documentation for this "feature", I'm inclined to think that this is just a bug in Nuget.