3
votes

I'm encountering build errors in my project after signing some of the assemblies it has been happy to build with pre-signing. In the error list I'm seeing the errors like:

The type 'XXX' is defined in an assembly that is not referenced. You must add a reference to assembly 'XXX, Version=[correct version], Culture=[correct culture], PublicKeyToken=null [incorrect public key token]'

When reverting back to the non-signed assemblies (only code difference is the signing information in the referenced assemblies and their solution which stores the shared key), everything builds again.

Unfortunately, these files need to be signed, so I'm wondering if anyone has encountered this issue before?

Thanks, Rob

1
I should add that the .csproj reference for the signed assemblies is correct and I've tried using SpecificVersion=True and False - Rob
Have you tried a rebuild all? - Nick Butler
So you are using delay signing ? Be sure to use the proper key and check your assembly with SN -vf Try to delete and recreate the reference on the signed assembly - Guillaume
Nicholas: I've tried rebuilding everything, deleting bin and obj and referencing the assemblies with and without NuGet; all to no avail. Guillaume: The assemblies are all non-delay signed and without username/password. Thanks - Rob

1 Answers

4
votes

Thanks to everyone for their answers.

As it turns out, it was nothing to do with the fact that the assemblies had become signed. There were simply other assemblies that were still referencing the old signed versions that I hadn't spotted.

...as is usually the case, the error was between the chair and the keyboard.