当我运行 dotnet ef update 数据库时出现此错误:
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.)
Run Code Online (Sandbox Code Playgroud)
我的 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>
Run Code Online (Sandbox Code Playgroud)
我的连接字符串:
"DefaultConnectionString": "Server=.;Database=ShopCore;Trusted_Connection=True;"
Run Code Online (Sandbox Code Playgroud)