Search code examples
c#c#-4.0dllreferencecode-signing

What is the reason for not working code after signing in Visual Studio 2010?


I got "Referenced assembly 'xxxxxxxxxx.GPUImage' does not have a strong name error" and according to How to fix "Referenced assembly does not have a strong name" error, I have corrected the issue. I have added the correct referencing also. (I have this problem with two other third-party assemblies and after signing them they work properly.)

But after I sign, it gives a new error which was not been given earlier. It is as follows.

Error    2    The type 'xxxxxxxxxx.GPUImage.ImageFilter' is defined in an assembly
that is not referenced. You must add a reference to assembly 'xxxxxxxxxx.GPUImage',
Version=2.0.0.0, Culture=neutral, 'PublicKeyToken=null'.

What is the reason for this? Can a .dll consist with an unassigned .dll inside the signed one?

As mentioned by @eric, I run fusion log and the following is the log file.

Enter image description here


Solution

  • Some assembly in your solution is still referencing an unsigned version of the assembly that defines GPUImage.ImageFilter. You get that from PublicKeyToken=null.

    Try looking at how loading is resolving using the Fusion Log Viewer. It should tell you which assembly is trying to reference the unsigned one.