Bug with Blazor apps and PostgreSQL

Greetings everyone. I'm a new user of Radzen and came across what I suspect is a bug.

Using Radzen 2.20.2, I just tried to build a Server Side Blazor app using PostgreSQL as the database. The app is just a simple app with generated CRUD pages for a single table with 3 varchar() columns and a bigint/serial for the primary ID. No customizations, just created new app, added the data connection, auto generated the CRUD pages for the table and clicked "Run"

Although the Radzen IDE sees the database and can scaffold the pages and EF Core models, the generated app will not run from the Radzen IDE, command line, or Visual Studio. Below is the error as seen from the browser:

An unhandled exception occurred while processing the request.

TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Query.Pipeline.IQueryableMethodTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Microsoft.Extensions.DependencyInjection.NpgsqlEntityFrameworkServicesBuilderExtensions.AddEntityFrameworkNpgsql(IServiceCollection serviceCollection)

However when looking closer at the project that is generated by Radzen, I noted that "Npgsql.EntityFrameworkCore.PostgreSQL version 3.0.0-preview7". If I upgrade the package to version 3.0.0-preview8, it will run.

Unfortunately, making any changes in Radzen, it seems to overwrites my the package list and it reverts back to 3.0.0-preview7 next time I open it in VS.

Is this a known bug? If not, can it be confirmed? Or am I doing something wrong?

It seems we forgot to update the Npgsql.EntityFrameworkCore.PostgreSQL package. We will do so with the next Radzen release.

Meanwhile you can add the csproj file to thecode generation ignore list and Radzen will not overwrite your changes.

1 Like

Thank you, korchev! Adding the csproj is working as an interim fix. I am really impressed with Radzen and the support I've received so far.

The latest Radzen release 2.20.3 should contain a fix for that. You can remove the csproj from the ignore list.

1 Like

Wow! That was fast! Thanks.