Questions tagged «assembly-signing»

3
如何声明朋友集?
我的解决方案中有2个项目: 大会(基础图书馆) 测试组件(NUnit) 我已经在第一个项目中将测试程序集声明为朋友程序集: [assembly: InternalsVisibleTo ("Company.Product.Tests")] 一切正常,直到我意识到我忘记设置解决方案来对我的程序集进行签名。因此,创建了一个snk文件并设置Visual Studio项目以签署第一个程序集(基本库)。现在,当我编译第一个项目时,出现以下错误: 朋友程序集引用“ Company.Product.Tests”无效。强名签名程序集必须在其InternalsVisibleTo声明中指定一个公钥。 我尝试使用sn实用程序从我的snk文件中提取公钥,但它会生成一个有线二进制文件,我不确定该如何使用。我该如何解决该问题?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.