Can strongly named assembly1 reference non-strongly named assembly2 ?

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 ?
 
M

Mattias Sjögren

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
 
G

Guest

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.
 
O

Oleg Subachev

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 :-(
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top