The InternalsVisibleToAttribute
must be provided with the name of the assembly you wish to be able to view your internal methods.
In your example, you appear to be saying: The internal methods of ConsoleApplication2
are visible to ConsoleApplication2
.
What you instead want to be saying is The internal methods of ConsoleApplication2
are visible to SomeOtherLib
, which you would do like so:
[assembly: InternalsVisibleTo("SomeOtherLib")]