A while back I wrote about how to access internal methods in unit tests. When I actually tried to do it, I got the following error message:
error CS1726: Friend assembly reference 'MyDllTests' is invalid. Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations.
I looked at the AssemblyInfo.cs, and as I thought, there was no key file or key name specified which means that it’s not signed at all.
However, we had empty attributes in the AssemblyInfo.cs file, the way Microsoft had it in their project templates in Visual Studio 2003:
Eventually I found that the .NET 2.0 compiler counts this as being strong-name signed, so I commented out those lines and the error went away. Strange.