Visual studio NuGet引用在开发中工作,在生产中失败

Visual studio NuGet引用在开发中工作,在生产中失败,visual-studio,json.net,nuget-package,pushsharp,Visual Studio,Json.net,Nuget Package,Pushsharp,我使用PushSharp传递移动推送消息,它依赖于Newtonsoft.Json.dll。我还通过NuGet安装了Newtonsoft.Json.dll,因为我还将其用于其他用途。几天前,我在VS2012中通过NuGet将Newtonsoft.Json.dll更新为v6.x。当我在VS2012中运行该项目时,没有问题,但是当我部署到生产环境时,PushSharp抛出一个异常,即找不到Newtonsoft.Json.dll 4.5.x。根据VS2012中的NuGet Manager,PushSha

我使用PushSharp传递移动推送消息,它依赖于Newtonsoft.Json.dll。我还通过NuGet安装了Newtonsoft.Json.dll,因为我还将其用于其他用途。几天前,我在VS2012中通过NuGet将Newtonsoft.Json.dll更新为v6.x。当我在VS2012中运行该项目时,没有问题,但是当我部署到生产环境时,PushSharp抛出一个异常,即找不到Newtonsoft.Json.dll 4.5.x。根据VS2012中的NuGet Manager,PushSharp的Newtonsoft.Json.dll要求为“>=4.5.x”。为什么它可以在我的开发机器上正常工作?我在我的开发电脑上的任何地方都找不到任何引用(GAC或bin)Newtonsoft.Json.dll 4.5。

您可能需要将程序集绑定重定向添加到配置文件:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="1.0.0.0-4.5.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>


谢谢。NuGet/VS更新错误地更新了我的配置部分,我完全错过了它;很乐意帮忙。