我需要Newtonsoft来使用playfab,他们有一个很好的示例,使用Newtonsoft可以在游戏中完成我想要的几乎所有事情。
但我无法使用visual studio->工具->NUget包管理器->包管理器控制台安装它。
我使用以下命令:"Install Package Newtonsoft.Json-Version 3.5.8"
这就是我看到的:
PM> Install-Package Newtonsoft.Json -Version 3.5.8
Attempting to gather dependencies information for package 'Newtonsoft.Json.3.5.8' with respect to project 'Game.CSharp', targeting '.NETFramework,Version=v3.5,Profile=Unity Subset v3.5'
Attempting to resolve dependencies for package 'Newtonsoft.Json.3.5.8' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Newtonsoft.Json.3.5.8'
Resolved actions to install package 'Newtonsoft.Json.3.5.8'
Install failed. Rolling back...
Package 'Newtonsoft.Json.3.5.8 : ' does not exist in project 'Game.CSharp'
Removing package 'Newtonsoft.Json.3.5.8 : ' from folder 'C:Users\DocumentsGamepackages'
Removed package 'Newtonsoft.Json.3.5.8 : ' from folder 'C:Users\DocumentsGamepackages'
Install-Package : Could not install package 'Newtonsoft.Json 3.5.8'. You are trying to install this package into a project that targets '.NETFramework,Version=v3.5,Profile=Unity Subset v3.5', but the
package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Newtonsoft.Json -Version 3.5.8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
有人能帮我指明正确的方向吗,提前感谢
PlayFab C#和Unity SDK不再需要Newtonsoft.Json。我们在这两个SDK中都加入了SimpleJson的修改实现,以便在我们端进行更多的定制和控制。
如果需要,您可以使用Newtonsoft.Json,我们支持热交换Json解析器,但我们为最新的实现提供了更好的支持。
我们不会定期检查Stack Overflow是否有未回答的问题,所以请随时在我们自己的论坛上发布这些问题,以获得更快的回复:https://community.playfab.com/index.html