尝试在 VS Code 中使用 X509Certificate2UI 时出现以下错误:
The type or namespace name 'X509Certificate2UI' does not exist in the namespace 'System.Security.Cryptography.X509Certificates' (are you missing an assembly reference?) [netcoreapp1.1]
我发现一些站点表明解决方案是添加 system.security.dll 程序集,但这些响应似乎不适合 VS Code。我已经将 X509Certificates 依赖项添加到 project.json 文件中,这似乎对我没有多大好处:
},
"dependencies": {},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
},
"System.Security.Cryptography.X509Certificates": "4.3.0" //"4.3.0-*"
},
"imports": "dnxcore50"
}
任何帮助将不胜感激 :)
-内特