An attribute in .NET to expose members marked as internal to selected assemblies.
In .NET, members with the access modifier 'internal' are only visible to classes inside the current assembly. This can be circumvented by adding the InternalsVisibleTo attribute to the AssemblyInfo file.
This way, the assembly with the internal members can control which other assemblies have access to these members.
Both assemblies must be unsigned or both must be signed. If both are signed, the full public key must be included in the constructor of the attribute.
An unsigned assembly can expose the internal members to another unsigned assembly with (C# and VB.NET):
[assembly:InternalsVisibleTo("AnUnsignedAssembly")]
<Assembly:InternalsVisibleTo("AnUnsignedAssembly")>
For a signed assembly to expose the internal members to another signed assembly, the following can be used (C# and VB.NET):
[assembly: InternalsVisibleTo("SignedAssembly, PublicKey=002400000480000094" +
"0000000602000000240000525341310004000" +
"001000100bf8c25fcd44838d87e245ab35bf7" +
"3ba2615707feea295709559b3de903fb95a93" +
"3d2729967c3184a97d7b84c7547cd87e435b5" +
"6bdf8621bcb62b59c00c88bd83aa62c4fcdd4" +
"712da72eec2533dc00f8529c3a0bbb4103282" +
"f0d894d5f34e9f0103c473dce9f4b457a5dee" +
"fd8f920d8681ed6dfcb0a81e96bd9b176525a" +
"26e0b3")]
<Assembly:InternalsVisibleTo("SignedAssembly, PublicKey=002400000480000094" + _
"0000000602000000240000525341310004000" + _
"001000100bf8c25fcd44838d87e245ab35bf7" + _
"3ba2615707feea295709559b3de903fb95a93" + _
"3d2729967c3184a97d7b84c7547cd87e435b5" + _
"6bdf8621bcb62b59c00c88bd83aa62c4fcdd4" + _
"712da72eec2533dc00f8529c3a0bbb4103282" + _
"f0d894d5f34e9f0103c473dce9f4b457a5dee" + _
"fd8f920d8681ed6dfcb0a81e96bd9b176525a" + _
"26e0b3")>