Hangfire: Newtonsoft.Json dependency warning

Created on 19 Aug 2017  路  3Comments  路  Source: HangfireIO/Hangfire

I'm using newest Hangfire + Hangfire/AspNetCore packages and on build I get strange warning:

warning NU1603: Hangfire.Core 1.6.15 depends on Newtonsoft.Json (>= 5.0.0) but Newtonsoft.Json 5.0.0 was not found. An approximate best match of Newtonsoft.Json 5.0.1 was resolved.

I have Newtonsoft.Json 10.0.3, so why the warning?

image

project

Most helpful comment

I think this is happening because there is no Newtonsoft.Json 5.0.0.

From: https://github.com/NuGet/Home/wiki/Restore-errors-and-warnings

NU1603

Issue
A package dependency specified a version that could not be found. A higher version was used instead, which differs from what the package was authored against.

This means that restore did not find the best match. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.

Common causes
The package sources do not contain the expected lower bound version. _If the package expected has not been released then this may be a package authoring error._

The dependency should probably be moved to Newtonsoft.Json 5.0.1. This is the first version in the 5.0.0 range. https://www.nuget.org/packages/Newtonsoft.Json/

All 3 comments

Experience the same problem. It's really weird. If I go to bin/debug/net461/myapp.exe.config, there's a binding for Newtonsoft from 0.0.0 to 10.0.0, so it should work.

I got this warning right after an upgrade from VS 2015 to VS 2017. It might have something to do with the fact Hangfire still uses an old project structure with project.json.

@cbmek Do you use VS 2017 too?

I think this is happening because there is no Newtonsoft.Json 5.0.0.

From: https://github.com/NuGet/Home/wiki/Restore-errors-and-warnings

NU1603

Issue
A package dependency specified a version that could not be found. A higher version was used instead, which differs from what the package was authored against.

This means that restore did not find the best match. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.

Common causes
The package sources do not contain the expected lower bound version. _If the package expected has not been released then this may be a package authoring error._

The dependency should probably be moved to Newtonsoft.Json 5.0.1. This is the first version in the 5.0.0 range. https://www.nuget.org/packages/Newtonsoft.Json/

I think this is a duplicate of #947.
There are some workarounds listed there, but not @squirmy's fix suggestion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

plmwong picture plmwong  路  3Comments

cottsak picture cottsak  路  3Comments

thurfir picture thurfir  路  4Comments

cindro picture cindro  路  3Comments

dgaspar picture dgaspar  路  4Comments