我正在为一个类库编写一些单元测试,该类库通常在内部作为 nuget 包发布。我在解决方案中添加了一个类库(到目前为止,它只有一个其他类库项目),并添加了对 NUnit 和要测试的项目的引用。
我添加了一个非常简单的测试,它创建了一个类的实例,但它立即失败并出现以下错误:
Strong name signature could not be verified. The assembly may have been
tampered with, or it was delay signed but not fully signed with the correct
private key.
提供nuget包代码主体的类库有一个key.snk
文件和一个CompanyNamePublic.snk
文件。
我需要做什么才能向此解决方案添加单元测试?