So I am connecting to PostgreSQL using Npgsql library but getting error when I try to connect to Production environment although the same code works for Dev environment. Even the version of PostgreSQL is exactly the same on Prod and Dev but it doesn't work. Trying for more than 2 hours now and saw various threads here on Stackoverflow and other sites but no luck.
PostgreSQL version
PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1), 64-bit
.Net version 4.7.1 (it's a command line application)
Npgsql.dll version 2.2.3.0
Error
Only AuthenticationClearTextPassword and AuthenticationMD5Password supported for now. Received: 10
If I use Npgsql.dll 4.0.4.0 then I start getting following error for both Prod and Dev environment.
Error
Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies
Unable to solve this issue please help.