.NET Core 3.1 始终加密

.NET Core 3.1 Always Encrypted

我在使用 .NET Core 3.1 和 SQL Always Encrypted 时遇到以下错误。这在 3.1 中受支持吗?也许我在这里遗漏了一些东西..

Keyword not supported: 'column encryption setting'.

目前安装了以下软件包

    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.12.0" />
    <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
    <PackageReference Include="Dapper" Version="2.0.30" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.1" />
    <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
    <PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
    <PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
    <PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="3.0.4" />
    <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />

需要将以下包引用添加到 Microsoft.Data.SqlClient(参见 nuget)并使用此 Microsoft.Data.SqlClient 而不是 System.Data.SqlClient.

    using (var conn = new Microsoft.Data.SqlClient.SqlConnection(connectionString))
    {
        await conn.OpenAsync();
    }