asp.net - 在这种情况下不可访问,因为它是朋友
问题描述
我从另一个 C# 项目中提取了一些代码并将其转换为 vb,但现在我得到了错误:
Is not accessible in this context because it is friend
Imports System.Security.Cryptography
Public Shared Sub Sign()
CryptoConfig.AddAlgorithm(GetType(RSAPKCS1SHA256SignatureDescription), "http://www.w3.org/2000/09/xmldsig-more#rsa-sha256")
End Sub
所需的命名空间是System.Deployment.Internal.CodeSigning
,但这个命名空间似乎没有RSAPKCS1SHA256SignatureDescription
.
正在导入的命名空间是,System.Security.Cryptography
但我开始认为这是从错误的库派生的。
Imports System.Security.Cryptography
Namespace System.Security.Cryptography
Friend Class RSAPKCS1SHA256SignatureDescription
Inherits RSAPKCS1SignatureDescription
Public Sub New()
End Class
End Namespace
任何人都可以提供对此错误消息的见解吗?
这个错误似乎并不代表微软所说的:
错误 ID:BC30389
https://docs.microsoft.com/en-us/dotnet/visual-basic/misc/bc30389
解决方案
推荐阅读
- visual-studio-code - VS Code Extension Api:如何触发图像预览
- vue.js - 在 nuxt 生成的 html 中添加静态文本
- jenkins - 无法保存来自 Jenkins 中的属性文件的值
- nativescript - 滚动视图中的 NativeScript 最后一个元素被底部导航部分隐藏
- javascript - 根据路由编辑 NavBar 信息
- bash - 无法从目标表达式中拆分网络掩码
- java - Javafx FXML 无法从其他包加载控制器
- python-3.x - 为什么我的 Python 程序没有向控制台打印任何内容?
- java - 如何确保 rxjava 方法并行执行并完成?
- unity3d - Hololens 1 未在 MRTK 场景中检测到空中敲击或其他手势