views:

311

answers:

1

When I try to sign the assembly I get the following error:

Error 1 Assembly generation failed -- Referenced assembly 'comlib' does not have a strong name

Is it possible to sign an assembly that reference unsigned assemblies or do I have to sign the COM interop assemblies as well?

+3  A: 

Yes, you will have to sign everything.

For a good explanation as to why you would need to do this, I would recommend that you read Eric Lippert's Alas, Smith and Jones:

If assembly Smith is a strong-named assembly, and Smith says that assembly Jones is its friend, then Jones must also be strong-named. If, however, Smith is not strong-named, then Jones need not be strong-named either.

I'm occasionally asked "what's up with that?"

Edit: He doesn't mention COM, but the theory still applies to your situation.

Andrew Hare
Indeed. The situation I am talking about in the blog is not exactly this situation -- there I am talking about "friend assemblies" -- but the _logic_ of why this is illegal is exactly the same in both cases.
Eric Lippert