Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm installing NewtonSoft.Json for parsing Json in .NET application. When I'm using Visual Studio(VS) 2012, it can not be installed via NuGet. This is the error I have got:

'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'

I tried to copy the DLL over and just use it, seems like some dependencies screwed up in this version (10.0.2).

After few hours research, finally I've found out it is the problem of the compatibility of VS2012 and Newtonsoft Json 10.0.2.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
806 views
Welcome To Ask or Share your Answers For Others

1 Answer

because NuGet Package Manager (Version 2.8.60318.667) for VS 2012 does not support .NETStandard (Used for Latest Newtonsoft Json Parser Lib. https://github.com/NuGet/Home/issues/3131

I resolve this issue by installing older version of Newtonsoft Json:

PM> Install-Package Newtonsoft.Json -Version 9.0.1

More details on: https://github.com/NuGet/Home/issues/5162 .


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...