进行内部类可见他人组件 [英] Make internal classes visible to others assemblies
问题描述
这是真的,使内部类从我的装配可见光到其他组件?
Is it real to make internal classes from my assembly visible to other assemblies?
我知道的AssemblyInfo文件和
I know about AssemblyInfo file and
[assembly: InternalsVisibleTo()]
属性
但它在我的情况不工作。主要目的是做到这一点是让从LINQPAD可能的调用方法。所以这个 [汇编:InternalsVisibleTo(LINQPad)]
不起作用。我donnt知道为什么。在项目中,我使用依赖解析器,这是很难做这样的事情linqpad。任何建议?
But it doesnt work in my case. The main purpose to do it is to make possible call methods from LINQPAD. So this [assembly: InternalsVisibleTo("LINQPad")]
doesnt work. I donnt know why. In my project i use dependency resolver and it is hard to do such thing in linqpad. Any suggestion?
推荐答案
我刚刚上传的一个新的测试版,使这个工作。
I've just uploaded a new beta that allows this to work.
下面的属性添加到您想要LINQPad访问其内部的库:
Add the following attribute to the libraries whose internals you want LINQPad to access:
[assembly: InternalsVisibleTo("LINQPadQuery")]
您还需要启用LINQPad的喜好此功能(编辑|偏好|高级)。
You'll also need to enable this feature in LINQPad's preferences (Edit | Preferences | Advanced).
让我知道你一起怎么弄。
Let me know how you get along.
这篇关于进行内部类可见他人组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!