views:

55

answers:

1

Hello, I have solution in Visual Studio, so this solution contains a few projects, also I have public only interfaces and internal classes, I'll use ILMerge for build one dll from all projects in this solution, Attention :) question, How can I show all internal classes to all projects in solution? Thanks.

+1  A: 

I believe you are looking for the InternalsVisibleToAttribute?

YWE
Something like that but only for development, just in Visual Studio, I have for example my project and test project, How can I test internal classes ? Thanks.
jitm
You can apply the InternalsVisibleTo attribute to your project that you want to test (in AssemblyInfo.cs) and give your test project access to all the internal classes within your application project.
YWE
and where can I read about this ?
jitm
You can look at the link provided in the answer (http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx). If you use that attribute in your application project and specify the assembly that your test project is in, only your test project will be able to see all the internal classes and no other assembly can.
YWE