-
Notifications
You must be signed in to change notification settings - Fork 873
Description
Hi everyone 👋
At our company, we’re building an ASP.NET Core API backed by a PostgreSQL database, using Fluent NHibernate for data access.
We’re currently migrating to .NET 10, which means all our NuGet packages are being updated as well. We’ve run into an issue with the RC-1 release of the Npgsql driver.
To reproduce the problem, we’ve put together a minimal console app with a single table defined like this:
- id: int, auto-increment
- code: string (50 chars), not null
- description: string (200 chars), nullable
- validfrom: DateOnly, not null
- validto: DateOnly, nullable
- enabled: bool, not null
- price: double, not null
The app simply inserts a record, reads it back, and deletes it.
Everything works fine with this package set:
<PackageReference Include="NHibernate" Version="5.6.0" />
<PackageReference Include="FluentNHibernate" Version="3.4.1" />
<PackageReference Include="Npgsql" Version="9.0.4" />
But when switching to the 10.0.0-tc.1 we get the following error:
System.FormatException: Input string '24/10/2025' was not in the correct format.
...
Inner Exception:
InvalidCastException: Unable to cast object of type 'System.DateOnly' to type 'System.IConvertible'.
We’re aware this is a pre-release package, but we wanted to flag the issue in case it helps others or maintainers.
Thanks!