Could not load file or assembly ‘System.Memory, Version=4.0.1.’ in Visual Studio 2015

If this error is appearing in an IIS app such as ASP.NET, then there is a high probability that you are missing a binding redirect in the web.config. When you install from Nuget, you should see a binding redirect in the web.config. If you deploy the application to another machine but fail to set up … Read more

Entity Framework Core jsonb column type

Based on H. Herzl comment: My final solution was something like this: public class MyTableClass { public int Id { get; set; } [Column(TypeName = “jsonb”)] public string Data { get; set; } } Migrations generated this: Data = table.Column<string>(type: “jsonb”, nullable: true), When updated the database with migrations, the Data column was created correctly … Read more

Postgres Npgsql Connection Pooling

Npgsql connection pooling is implemented inside your application process – it has nothing to do with PostgreSQL, which is completely unaware of it. The mechanism is very simple. When you close a pooled connection, instead of physically closing the connection to PostgreSQL the physical connection is kept around idle in memory (in a “pool”). The … Read more

Unable to load System.Threading.Tasks.Extensions

In my case, I got the issue after upgrading to version 4.5.4 and tried @user2713341 answer. It didn’t work but put me in the right direction. My project had no bindings for this library, so I added the binding and it worked <dependentAssembly> <assemblyIdentity name=”System.Threading.Tasks.Extensions” publicKeyToken=”cc7b13ffcd2ddd51″ culture=”neutral” /> <bindingRedirect oldVersion=”0.0.0.0-4.2.0.1″ newVersion=”4.2.0.1″ /> </dependentAssembly> and it … Read more

.NET6 and DateTime problem. Cannot write DateTime with Kind=UTC to PostgreSQL type ‘timestamp without time zone’

A. Solved by adding AppContext.SetSwitch(“Npgsql.EnableLegacyTimestampBehavior”, true); to the Startup Configure method. B. Or in case you have no Startup class at all and all your initialization is inside Program.cs with a host builder then your file ending might look like: … //adding services etc var host = builder.Build(); AppContext.SetSwitch(“Npgsql.EnableLegacyTimestampBehavior”, true); … //your other scoped code … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)