Exception when upgrading Npgsql to Version 5.0.0-preview1.1
See original GitHub issueHi,
It seems EF Core tools doesn’t play well with the new version.
In my project, as soon as I upgrade Npgsql
to version 5.0.0-preview1.1
(from 5.0.0-alpha1
), I get the following exception:
Message:
[Test Collection Cleanup Failure (ApiIntegrationTestsCollection)]: System.MissingMethodException : Method not found: 'System.String System.Data.Common.DbException.get_SqlState()'.
Stack Trace:
<<DoReadMessage>g__ReadMessageLong|0>d.MoveNext()
AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
<>c__DisplayClass170_0.<DoReadMessage>g__ReadMessageLong|0(DataRowLoadingMode dataRowLoadingMode2, Boolean readingNotifications2, Boolean isReadingPrependedMessage, CancellationToken cancellationToken2)
NpgsqlConnector.DoReadMessage(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, CancellationToken cancellationToken)
NpgsqlConnector.ReadMessage(Boolean async, CancellationToken cancellationToken)
NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
<<Open>g__OpenAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
NpgsqlConnection.Open()
NpgsqlDatabaseCreator.Exists()
RelationalDatabaseCreator.EnsureDeleted()
DatabaseFacade.EnsureDeleted()
ApiIntegrationTestsFixture.Dispose(Boolean disposing) line 63
WebApplicationFactory`1.Dispose()
Here’s are the packages installed in my project, either one of the following changes triggers the error:
<ItemGroup>
<PackageReference Include="FluentValidation" Version="9.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0-rc.2.20475.17" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0-rc.2.20475.17" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="8.0.0-preview" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-rc.2.20475.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="5.0.0-rc1" />
+ <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="5.0.0-rc2" />
- <PackageReference Include="Npgsql.Json.NET" Version="5.0.0-alpha1" />
+ <PackageReference Include="Npgsql.Json.NET" Version="5.0.0-preview1.1" />
<PackageReference Include="Weitzhandler.FluentValidaiton.EntityFrameworkCore" Version="0.2.0" />
</ItemGroup>
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Npgsql 5.0 Release Notes
Npgsql forcibly closes the physical connection and raises an exception, making sure the application isn't blocked. Previous support was inconsistent across ...
Read more >Npgsql can't find NpgsqlException when doing Migrations
Its trying to tell me about an error but I presume it can't find the exception type its trying to wrap it in...
Read more >Npgsql 2.2.0
Version Downloads Last updated
8.0.0‑preview.4 37,402 3 months ago
8.0.0‑preview.3 19,170 4 months ago
8.0.0‑preview.2 24,586 5 months ago
Read more >Versioning Policy
Version Current minor Supported First Release Final Release
15 15.4 Yes October 13, 2022 November 11, 2027
14 14.9 Yes September 30, 2021 November 12,...
Read more >Major Version Upgrade for PostgreSQL Flexible Server
Most extensions are automatically upgraded to higher versions during an in-place major version upgrade, with some exceptions. Refer limitations ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After setting the global.json to the rc2 sdk, it worked fine. Sorry for the hassle and thanks for your diligence @roji.
Thanks for looking into it and confirming @weitzhandler.