1、对程序集及单元测试的程序集用同一个秘钥签名;
2、打开vs开发人员命令提示,输入:
D:
cd abcdef
来调整目录到D:abcdef;
3、输入
sn -p Key.pfx Key.PK.pfx
回车,以生成公钥文件;
4、输入
sn -tp Key.PK.pfx
回车,以产生公钥;
5、在AssemblyInfo.cs中添加
[assembly: InternalsVisibleTo("SQLiteHelper.Test,PublicKey=00240000048000009400000006020000002400005253413100040000010001001b950384e44d1cea053027373eda086408dd4ae4900faa10f28106761f1b23704b53640bfc3817a8339a51fadd242bcfb39562af5717c45d6c99734553f8d5c11cf01b3c31c39553b1f6624cce8448f71f1def9175b070ad655c5cbf7ce4fa1ab7c39f99b14ea00da48d73befaff6470823533a4d72b7a222798380809496deb")]