question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.NET 6.0 RC1 release availability & Workaround

See original GitHub issue

Hello,

I have upgraded to .NET 6.0 RC1. I have also upgraded Entity Framework Core Tools to the 6.0.0-rc.1.21452.10 version. But the NuGet Npgsql.EntityFrameworkCore.PostgreSQL package has still the version 6.0.0-preview7.

When trying to generate a migration, there is the following error :

Method 'AppendIdentityWhereCondition' in type 'Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlUpdateSqlGenerator' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.

So I guess this is normal. I have tried to downgrade the Entity Framework Core Tools to 6.0.0-preview.7.21378.4. When doing the command dotnet tool update --global dotnet-ef --version 6.0.0-preview.7.21378.4, I get the error message :

The requested version 6.0.0-preview.7.21378.4 is lower than existing version 6.0.0-rc.1.21452.10.

Questions :

A. When Npgsql.EntityFrameworkCore.PostgreSQL .NET 6.0 RC1 will be available ? B. Is there a command to force to an update of Entity Framework Core Tools to a lower version ? I couldn’t find one. If yes, could it solve my problem ?

Thanks for any answer.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rojicommented, Sep 22, 2021

@boukenka this is on the top of my list, but it may still take a few days - please be patient.

0reactions
muhdameancommented, Jan 24, 2022

So… it’s generally recommended to use UTC timestamps everywhere - this way you don’t have a dependency on your server (or database) timezone, and timestamps don’t need to be converted. And yes, when doing this you would typically convert your UTC timestamps to the user’s time zone at the very edge, i.e. when displaying it; this decouples your actual timestamp data (in the database) from any particular user, and also allows you to display the same UTC timestamp to different users in different timezones.

If this is what you want, then yes - make sure your database column has the type timestamp with time zone (which represents a UTC timestamp in PostgreSQL), and use DateTime.UtcNow instead of DateTime.Now in .NET (the latter generates a local timestamp based on the machine’s timezone).

However, pay special attention to existing data when doing this change! If you already have columns with data in your database, make sure you convert them appropriately (I’ve written some docs on this).

Hope that clarifies things a bit. This is quite a non-trivial change, and I’m very interested in people’s reactions/opinions on it - don’t hesitate to post back with more questions etc.

Thanks for this detailed explanation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing .NET 6 Release Candidate 1
NET 6 RC1 is coming soon in Visual Studio 2022 for Mac Preview 1, which is currently available as a private preview.
Read more >
ASP.NET Core updates in .NET 6 Release Candidate 1
NET 6 Release Candidate 1 (RC1) is now available and includes many great new improvements to ASP.NET Core. Here's what's new in this...
Read more >
.Net 6 RC Ready for Prod? : r/dotnet
NET 6.0 and it doesn't affect Microsoft (and ostensibly has a work around), chances are it won't be fixed until the first maintenance...
Read more >
NET Core 6.0.0-rc.1
Release 6.0.0-rc.1 of .NET Core, released on 2021-09-14. versionsof.net gives an overview of all releases and versions of .NET Core.
Read more >
ReSharper and Rider 2022.2.4 Bug-Fix Releases Are Here
Rider. Fixed the CVE 2022-41032 vulnerability Microsoft recently uncovered in .NET 7.0.0-rc.1, .NET 6.0, .NET Core 3.1, and NuGet clients ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found