ASP.net app crashes - Could not load file or assembly 'Microsoft.Threading.Tasks.Extensions.Desktop'

前端 未结 4 1765
离开以前
离开以前 2020-12-09 04:24

I want to build a Google BigQuery C# ASP.net application using OAuth2 and the .Net 4.5 framework. I ran these NuGet installs

Install-Package Google.Apis.Bigq         


        
4条回答
  •  执笔经年
    2020-12-09 04:50

    Because the error is based on the fact that the latest version of Microsoft.Bcl.Async doesn't work in .NET 4.5, you can try to do the following:

    Open your Package Manager Console, and run the following commands:
    1) Uninstall-Package Microsoft.Bcl.Async -Force
    2) Install-Package Microsoft.Bcl.Async -Version 1.0.16

    It works in a sample I'm currently writing. Please let me know if it works for you.

    UPDATE (March 21st): You can update the package (new version 1.0.166-beta is available - https://www.nuget.org/packages/Microsoft.Bcl.Async/1.0.166-beta).
    I tested it on VS2013 with .NET 4.5 framework and it works.

提交回复
热议问题