1

I'm using MSBuild Community Tasks to automatically update my assembly version numbers according to my Subversion repository tag. I have added the following to my project file:

This gives me a new AssemblyInfo.cs file: unfortunately I need to add the following to get my MStests to work properly:

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("XLComponentsUnitTests")]

But I cannot figure out how to do this - there doesn't seem to be anyway through the MSBuild Community Tasks, for example. Can anyone provide guidance on this?

Chris Spicer
  • 2,144
  • 1
  • 13
  • 22

1 Answers1

3

Simple answer: Since this is not supported by the MSBuild community task, add this to one of the files of your project.

#ifdef DEBUG
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("XLComponentsUnitTests")]
#endif

There is nothing that says the assembly attributes have to all be in one file, or all generated by the <AssemblyInfo> task.

Todd
  • 5,017
  • 1
  • 25
  • 16
  • Thanks very much Todd! Now I look back over some of the tutorials I found, they were also using your suggested approach. – Chris Spicer Jun 23 '10 at 19:51