You should not sign any code you did not write yourself
with your strong name key pair. Instead you should obtain
a Primary Interop Assembly (PIA) from the author of the
component. You can create your own PIA for the component,
but the PIA guidelines clearly state that any interop
assembly that is not provided by the publisher of the COM
types is considered unofficial and should be avoided.
Because the types defined in such an assembly are not to
be signed by the publisher of the PIA, they are
incompatible with the definitions provided in the PIA.
If you still want to create a PIA for testing purposes
you can do the following:
1. If you haven't got a strong name key pair, create on
by using the strong name tool (sn.exe):
sn -k myKeyfile.snk
2. Create and sign a PIA for the component by using the
Type Library Importer (tblimp.exe):
tblimp
thridPartyComponent.dll /primary /keyfile:myKeyfile.snk /o
ut:unofficialThirdPartyComponentInterop.dll
For more information on PIAs see:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dndotnet/html/whypriinterop.asp
Anders Norås - senior consultant - Objectware
Blog:
http://dotnetjunkies.com/weblog/anoras