【发布时间】:2013-09-01 03:35:18
【问题描述】:
我有一个 VB.NET 应用程序崩溃并出现以下错误:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Threading.Tasks, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
我正在尝试使用 Microsoft.Bcl.Async 库。我已经通过 Nuget 在实际使用 Async/Await 调用的项目和引用它的项目上安装了它。一切都在我的计算机上完美运行,但是当我在另一台计算机上发布和测试时,当我尝试使用其中正在使用 Async/Await 的部分时,我的程序崩溃了。
System.Threading.Tasks 在 Copy Local 设置为 true 的两个项目中都被引用。 Microsoft.Threading.Tasks 在 Copy Local 设置为 true 的两个项目中都被引用。我已经看到the other thread 对此进行了介绍,它已安装在相关项目中。这些是我的 app.config 文件中包含的行:
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
</dependentAssembly>
我在设置时缺少什么?如果您需要更多信息,请告诉我。谢谢!
【问题讨论】:
标签: .net vb.net asynchronous base-class-library