Interop signing problems




I have read the various postings relating to Interop strong name
signing and cannot find an example similar to mine.

I have stringly named my AxInterops/Interops and they all work just
fine, but problems occur when I need to reference a thirdparty's

In my case I am talking about Interop.ShDocVw and AxInterop.ShDocVw. If
the thirdparty component also uses IE and it therefore also has its own
AxInterop/Interop files and they are also signed (with a different
signature to mine of course) I cannot get the component to run.

The problem is caused by something like this: the first AxInterop is
loaded into memory (say mine) and then when the thirdparty component
needs to use the same AxInterop it sees that this component is already
resident in memory and tries to use it, but it isn't the same
AxInterop/Interop it was compiled against as the signatures differ and
it can't load its prefered one, even if it were available, as you can't
have two assemblies in memory at the same time that to all
intent/purpose are the same.

Out of curiosity I examined Infragistics controls and they are signed
and yet the AxInterop.ShDocVw shipped with them is not signed, so how
do you have a signed assembly that can use a non-signed
AxInterop/Interop OR how do you resolved the problem of having a joint
use of the same Interop, but each use uses a different signature?

Please help me.....




Nicholas Paldino [.NET/C# MVP]


Have you used the /namespace option on TLBIMP? You should probably
create another namespace for the types that you import (instead of the
default ones) because of situations just like this. This way, even if
another component uses another interop assembly, there shouldn't be a
conflict. Also, you might want to rename the actuall DLLs as well.

Hope this helps.

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