Reputation: 4354
I'm adding this question as I ran into this issue and could see it happening to other people.
I have an MVC6 project which was building and tried to move from the full dnx451 to use the dnx core 5.0 version. As soon as I did this dnx core was unable to build due to Newtonsoft.json not being a compatible version with dnxcore. I was getting weird behaviour in my NuGet manager; I would upgrade and use precompile versions yet it would still show as using a different version.
Upvotes: 0
Views: 868
Reputation: 4354
It turned out this was due to an earlier attempt to use dnu wrap
. This had created a wrap folder, and in my global.json added this wrap folder to "projects". This meant that the version of newtonsoft.json which was being found in the wrap folder was taking precedence over the one which the dnxcore50 packages wanted.
As soon as I removed "wrap"
from my global.json and restored packages, the issue was resolved.
Upvotes: 2