Microsoft.Bcl.Async在Windows XP中不起作用

时间:2016-04-01 07:03:48

标签: .net-4.0 async-await windows-xp

我正在.NET Framework 4.0上的WPF中开发桌面应用程序,因为某些客户端计算机上有Windows XP。

我需要在.NET 4.0中使用async / await,因此我添加了对Microsoft.Bcl.Async(最新的NuGet版本)的引用。无论何时我使用Async / Await关键字,在Windows XP中启动时程序崩溃都会出现以下异常(适用于Windows 7+):

Could not load file or assembly 'System.Core, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or
one of its dependencies. The given assembly name or codebase was
invalid. (Exception from HRESULT: 0x80131047)

1 个答案:

答案 0 :(得分:4)

经过广泛研究后,我发现需要在Windows XP中安装this更新才能使Microsoft.Bcl.Async正常工作。