【发布时间】:2021-01-16 01:01:35
【问题描述】:
我已经按照this article 中的说明引用了文件System.Security.dll,但根据我的IDE,可以安全地删除using System.Security.Cryptography; 行,因为它没有被使用。
同一个 IDE 告诉我 DataProtectionScope 和 ProtectedData 出现错误。这些应该在 that 命名空间中。但是,当我点开包裹时,我看不到它们。
文章错了吗?如何访问这两个类?
【问题讨论】:
-
应该可以。您使用的是哪个版本的 .NET Framework?适用于哪个平台?你怎么做参考? PS:
DataProtextScope是什么? -
没有你的代码我们应该如何重现这个?
-
@CodesInChaos 什么代码?我正在输入
System.Security.Cryptography.,在我得到的列表中,没有DataProtectionScope或ProtectedData。所以,我猜代码是:System.Security.Cryptography.但这并不是一个新信息。 -
如果您看到项目的 References 文件夹下列出了 System.Security 程序集,那肯定可以工作。
-
这些天你可以从 NuGet 获得这个程序集:nuget.org/packages/System.Security.Cryptography.ProtectedData
标签: c# visual-studio-2010 cryptography