Friday, 2 January 2009

C# allowing Unit Test project to access internal members of another project

Assuming that you have 2 projects in your solution
+ MyProject
+ MyProjectTest
Add the following line to AssemblyInfo.cs in MyProject
[assembly: InternalsVisibleTo("MyProjectTest")]
This will allow you to access internal classes from MyProjectTest(unittests) project

No comments:

Post a Comment