我正在使用Windows Azure Web Jobs执行我的方法来获取使用LinqToTwitter的推文。我的web.config文件有:
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.22.0" newVersion="4.2.22.0" />
</dependentAssembly>
当我调试我的测试项目时,没有任何错误。但是,在将我的Web API发布到Azure后,在Web Job运行时出现以下错误:
System.IO.FileNotFoundException:无法加载文件或程序集“System.Net.Http.Primitives,Version = 1.5.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”之一或其依赖项。 系统找不到指定的文件。
请参见此处的日志信息。