简体   繁体   English

可以在C#中使用InternalVisibleTo而不使用强名称程序集吗?

[英]Can one use InternalVisibleTo without strong-named assembly in C#?

I could not find any clear statement on MSDN regarding this, there are some examples with strong names other are without, for me it seems like it should work even without but its not working. 我在MSDN上找不到关于此的任何明确声明,有一些强名称的例子,其他没有,对我而言似乎它应该工作,即使没有但它不起作用。

Thank you 谢谢

The documentation is quite explicit: 文档很明确:

Both the current assembly and the friend assembly must be unsigned, or both must be signed with a strong name. 当前程序集和友元程序集都必须是未签名的,或者两者都必须使用强名称进行签名。 If they are signed with a strong name, the argument to the InternalsVisibleToAttribute constructor must include the full public key as well as the name of the assembly. 如果使用强名称签名,则InternalsVisibleToAttribute构造函数的参数必须包含完整的公钥以及程序集的名称。

See this answer for an example of what full public key means. 有关完整公钥的含义,请参阅此答案

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

相关问题 C# 针对非特定版本的强命名程序集构建 - C# build against non specific version of strong-named assembly 带有强命名二进制文件的 CefSharp - CefSharp with Strong-Named binaries c# - 你可以对强名称程序集进行“弱”程序集引用 - c# - can you make a “weak” assembly reference to a strong named assembly 强命名程序集在我的Visual C#中不起作用 - Strong named assembly not working in my Visual C# 如何在不使用InternalVisibleTo的情况下从另一个程序集访问一个程序集的内部属性? - How to access the internal properties of one assembly from another assembly without using InternalVisibleTo? 强名命的大会 - Strong Named Assembly 强签名与为程序集命名的强相同吗? - Is strong signed the same as strong named for an assembly? App.config <bindingRedirect/> 使用强名称进行组装,然后在C#中使用短名称 - App.config <bindingRedirect/> for assembly with Strong Name and then use Short Name in C# 是否可以取消对程序集的FullName属性的检查? 是否可以在不使用强命名的情况下执行类似的检查? - Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming? 在.NET中使用强名称程序集确保代码没有被篡改? - Do strong-named assemblies in .NET ensure the code wasn't tampered with?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM