我在添加 ProtectKeysWithCertificate 这一行时出现编译时错误
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddDataProtection()
.SetApplicationName("Testervice")
.ProtectKeysWithCertificate(newCert);
//compile time error on ProtectKeysWithCertificate line
//method not found
}