Every time I have used the
InternalsVisibleToAttribute when developing an API, it feels a bit smelly. Like the API is not being designed in a truly encapsulated way. A lot of the times this is out of time constraints - exposing the internal functionality in an elegant, encapsulated way takes time, and a lot of times only one other assembly is going to need it, making
InternalsVisibleToAttribute seem like the correct solution.
InternalsVisibleToAttribute indicate a design smell, such as a case of refactoring gone wrong, or an indication that the two assemblies should not be separate?
Note: I understand the need to use
InternalsVisibleToAttribute for unit testing. This question does not refer to unit testing.