【问题标题】:Install Newtonsoft for unity .net 3.5 version安装 Newtonsoft for unity .net 3.5 版本
【发布时间】:2016-03-29 21:24:24
【问题描述】:

我需要 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\\Documents\Game\packages'
Removed package 'Newtonsoft.Json.3.5.8 : ' from folder 'C:\Users\\Documents\Game\packages'
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

有人可以帮助我正确的方向吗? 提前致谢

【问题讨论】:

  • "'.NETFramework,Version=v3.5,Profile=Unity Subset v3.5',但该包不包含任何与该框架兼容的程序集引用或内容文件。有关详细信息,联系包作者。” >> 您是否联系过 Newtonsoft 的 James? newtonsoft.com/contact
  • 不,我没有联系过他,抱歉我没有看到这一点。我会和他联系。谢谢!

标签: c# json.net install.packages


【解决方案1】:

PlayFab C# 和 Unity SDK 不再需要 Newtonsoft.Json。我们已将 SimpleJson 的修改实现放入两个 SDK 中,以允许我们进行更多的自定义和控制。

如果需要,您可以使用 Newtonsoft.Json,我们支持热插拔 Json 解析器,但我们为我们的最新实现提供了更好的支持。

我们不会定期检查 Stack Overflow 是否有未回答的问题,因此请随时在我们自己的论坛上发布这些问题以获得更快的回复: https://community.playfab.com/index.html

【讨论】:

    猜你喜欢
    • 2011-03-23
    • 2010-12-15
    • 2021-12-30
    • 2014-10-10
    • 1970-01-01
    • 1970-01-01
    • 2010-10-07
    • 2012-05-26
    • 1970-01-01
    相关资源
    最近更新 更多