One thing you will notice with the InternalsVisibleToAttribute in Visual Studio 2005 is that an assembly's full public key must be now specified instead of the just the token (The help in MDN is wrong.).
That means that the following:
must be specified like so:
Way to retrieve the public key for an assembly.
Simply open up Visual Studio command prompt via the Start menu and type the following (replace MyAssembly.dll with your own assembly):
This will output the public key of your assembly to the command prompt, ready for pasting into the above attribute.
本文介绍了在Visual Studio 2005中使用InternalsVisibleTo属性时的一个常见错误:必须指定整个公共密钥而非仅密钥标记。文章还提供了如何获取指定程序集的完整公共密钥的方法。
1274

被折叠的 条评论
为什么被折叠?



