Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Cannot get around NpgSQL - Unable to load System.Threading.Tasks.Extensions exception

$
0
0

I have gone through the posted solutions for the Unable to load System.Threading.Tasks.Extensions issue but none seem to work. I am wondering if someone could review and comment on the solutions that I have tried.

Background

The steps below detail what I have tried.

  • I have a C# database project for a PostgrSQL database using .NET framework 4.7.2.
  • I am using the NuGet version 6.0.0-preview3 of the NpgSQL .NET provider for the PostgreSQL database.
  • The runtime version of the NpqSQL provider is 4.0.30319. The Version is 6.0.0.0
  • I am using NuGet version of 4.5.4 of the System.Threading.Tasks.Extensions assembly.
  • The runtime version is 4.0.30319.
  • The unable to load the System.Threading.Tasks.Extensions assembly exception is thrown while trying to instantiate a NpgsqlConnection object.

I have tried the solutions recommended in the Unable to load System.Threading.Tasks.Extensions post.

Below are the steps I have tried thus far.

  1. Applied all NuGet Updates to my NBWPostgresql.csproj.

This had no effect. The exception was generated when the NpgsqlConnection was instantiated. I next tried to do some binding redirects.

  1. I right-clicked the NBWPostgreSQL.csproj entry in the Solution Explorer.

  2. I clicked Properties in the menu.

  3. On the Application tab of the Properties settings, I cleared the checkbox for Auto-generate binding redirects.

  4. This added an App.config to the NBWPostgreSQL project.

  5. I tried the following for System.Threading.Tasks.Extensions:

    bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"

    bindingRedirect oldVersion="0.0.0.0-4.5.4" newVersion="4.5.4"


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>