I have project used Newtonsoft.Json 6.0.5 package then I want to use google.apis.calendar.v3 that install Newtonsoft.Json 12.0.3 automatically which made duplicated on Newtonsoft.Json . I have try to uninstall Newtonsoft.Json 6.0.5 but an error occour Unable to uninstall 'Newtonsoft.Json.6.0.5' because 'Microsoft.AspNet.WebApi.Client.5.0.0, Microsoft.Owin.Security.Facebook.2.0.0, Microsoft.Owin.Security.MicrosoftAccount.2.0.0, Microsoft.Owin.Security.OAuth.2.1.0, Microsoft.Owin.Security.Twitter.2.0.0, PushSharp.2.2.1, WebGrease.1.5.2' depend on it. What is the best solution to work with google.apis.calendar.v3 and other package that depend on old Newtonsoft.Json ?
Asked
Active
Viewed 91 times
0
-
In the project that references 6.0.5, instead of uninstalling can you upgrade that reference to 12.0.3? – David Jul 08 '20 at 13:10
-
1If you are required to work with both versions, have a look at https://stackoverflow.com/questions/5916855/using-multiple-versions-of-the-same-dll – casenonsensitive Jul 08 '20 at 13:12
-
I opened Nuget packaged and updated Newtonsoft.Json the latest package and error occour "the package Newtonsoft.Json 6.0.5 failed to uninstall please restart vs to finish process" when I make restart the solution restart and when Ia make rebuild error occour "Error CS0433 The type 'JsonConvert' exists in both 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' – Omar Seleim Jul 08 '20 at 13:30