Question

I need to use json.net for json serialization and deserialization, but I have the problem with installing this package. As I saw on the website it supports wp 7.1 and silverilight. When I'm typing in console Install-Package Newtonsoft.Json

Installing 'Newtonsoft.Json 6.0.1'.
Successfully installed 'Newtonsoft.Json 6.0.1'.
Adding 'Newtonsoft.Json 6.0.1' to Connected.
Uninstalling 'Newtonsoft.Json 6.0.1'.
Successfully uninstalled 'Newtonsoft.Json 6.0.1'.
Install failed. Rolling back...
Install-Package : Could not install package 'Newtonsoft.Json 6.0.1'. You are trying to install this package into a project tha
t targets 'Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package does not contain any assembly references or conte
nt files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Newtonsoft.Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

How to solve this issue ? How it should be properly done ?

No correct solution

OTHER TIPS

With windows phone 7, you should probably install the older version of that package, such as 5.0.1. You can do Install-package Newtonsoft.Json -version 5.0.1

right click on dll,in general tab,security section

and unblock it

thanks to : http://crodrigues.com/referencing-json-net-in-windows-phone-8/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top