简体   繁体   English

无法解析符号X509Store

[英]Cannot resolve symbol x509store

I have this line of code: 我有这行代码:

X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);

It works fine in a console project, but not in my Windows Phone project. 它在控制台项目中工作正常,但在我的Windows Phone项目中却无法正常工作。 In the Windows Phone project, X509store cannot be found. 在Windows Phone项目中,找不到X509store。

Why not? 为什么不?

For the .NET compact framework / Windows Phone apps, there is a solution here: 对于.NET Compact Framework / Windows Phone应用程序,这里有一个解决方案:

Is there any way to use X509Store in .NET CF? 有什么方法可以在.NET CF中使用X509Store? .

Bouncy Castle got you covered, check their site out. 有弹性的城堡让您覆盖,请检查他们的站点。 Download the source code, create new WP7 class library and add all files. 下载源代码,创建新的WP7类库并添加所有文件。 It should compile. 它应该编译。 Do not copy tests folder since it depends on NUnit for testing, you won't be needing that. 不要复制测试文件夹,因为它依赖于NUnit进行测试,因此您将不需要它。

What about the rest of your application, what do you want with certificates? 那么您的其余应用程序又如何呢?您想要证书吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM