Can strongly named assembly1 reference non-strongly named assembly2 ?

  • Thread starter Thread starter Oleg Subachev
  • Start date Start date
O

Oleg Subachev

When I try to use strongly named assembly1 that references
non-strongly named assembly2 I get the following error:

"The located assembly '<assembly2 name>' is not strongly named."

How can I force strongly named assembly1 to reference non-strongly named
assembly2 ?
 
How can I force strongly named assembly1 to reference non-strongly named
assembly2 ?

You can't. You can still load the assembly dynamically (Assembly.Load)
at runtime though.



Mattias
 
No you can not. But why should you want to? You have an assembly1. And
because you're concerned about security you sign it with a strong name. If
you could reference to an assembly which is not signed. The profit of signing
assembly1 is gone.
 
No you can not. But why should you want to? You have an assembly1. And
because you're concerned about security you sign it with a strong name. If
you could reference to an assembly which is not signed. The profit of signing
assembly1 is gone.

The problem arises from the fact that assembly2 is .NET generated COM
Interop
wrapper assembly for Win32 Com server :-(
 
The problem arises from the fact that assembly2 is .NET generated COM
Interop
wrapper assembly for Win32 Com server :-(

You can give those a strong name too, just like any other assembly.
Use Tlbimp with the /keyfile (or /keycontainer) option, or set the
Wrapper Assembly Key File option in the VS project properties dialog.



Mattias
 
Back
Top