0

I am writing some unit tests for a class library which is typically published as a nuget package internally. I have added a class library to the solution (which only has the one other class library project until now) and added references to NUnit and the project to be tested.

I added a very simple test which creates an instance of one of the classes and it fails immediately with this error:

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.

The class library which provides the body of the nuget package code has a key.snk file and a CompanyNamePublic.snk file.

What do I need to do to be able to add unit tests to this solution?

Matt W
  • 11,753
  • 25
  • 118
  • 215
  • Are you trying to build the system under test as well as your tests? You can't do that unless you have the proper key. If you have the source but not the proper key, you would only be able to build it with a key of your own. – Charlie May 10 '17 at 20:49
  • I did not write the code being tested, but I am writing the test code. I do have both the public and private key. – Matt W May 11 '17 at 08:15
  • Seems as if you basically asked the same question twice. I answered the other one. However, my question here was whether you were __building__ the system under test, not whether you __wrote__ it. – Charlie May 11 '17 at 22:35
  • Almost. Yes, I'm building the sut. It is a project in the solution. Thank you for the answer on the other post. I figured this post would get more attention as it's shorter. – Matt W May 12 '17 at 08:21

0 Answers0