Installing a Key into the Crypto Service Provider

podria

New Member
First, a short history:<BR><BR>I need to install assembly X into the GAC to use among multiple applications on the same machine. I used the sn.exe utility to create a StrongName for it, added that to its assemblyinfo.cs file, and tried to run gacutil.exe on X.<BR><BR>No good, because X has a reference to COM component Y, and Y doesn't have a StrongName. So I run<BR><BR> sn.exe -k Y.snk<BR><BR>...and then run<BR><BR> TlbImp.exe Y.dll /out:YNet.dll /publickey:Y.snk<BR><BR>...and get the following error:<BR><BR> TlbImp error: System.Runtime.InteropServices.COMException - StrongName APIs could not locate a matching CSP.<BR><BR>How do I install Y.snk into the CSP? <BR><BR>Better yet, has anyone else had any success/difficulty in getting a working shared assembly that has a COM reference?<BR><BR>Thanks,<BR>EricI found the solution:<BR><BR>tlbimp Y.dll /keyfile:Y.snk /out:interop.Y.dll /namespace:Y<BR><BR>Though it unfortunately doesn't solve my REAL problem, which is that this COM component just doesn't want to work in a shared assembly.
 
Back
Top