gpt4 book ai didi

.net - dotnet ef 更新数据库 : A connection was successfully established with the server, 但随后在登录过程中发生错误

转载 作者:行者123 更新时间:2023-12-05 04:27:08 24 4
gpt4 key购买 nike

当我运行 dotnet ef update database 时出现此错误:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

我的 csproj 文件:

  <PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.5.22302.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-preview.5.22302.2">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-preview.5.22302.2" />
</ItemGroup>

我的连接字符串:

"DefaultConnectionString": "Server=.;Database=ShopCore;Trusted_Connection=True;"

最佳答案

所以我发现我应该使用 EntityFrameworkCore.SqlServer version 6.0.6 而不是 7.0.0-preview.5.22302.2

关于.net - dotnet ef 更新数据库 : A connection was successfully established with the server, 但随后在登录过程中发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72896002/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com