Thursday 2 November 2017

Share Internals with other assemblies

Once in a while especially when you are unit testing you may want to expose classes, functions/methods, properties, fields, etc to another assembly, to do this all you have to do is in the AssemblyInfo.cs class of you the assembly whose internals you want to expose add the attrinbute

[assembly: InternalsVisibleTo("")]

msdn InternalsVisibleTo