Michael Dawson

I am developing a webpart which uses some old assemblies through the use of interop. However when building my solution I get the following messages

Assembly generation failed -- Referenced assembly 'Interop.ADODB' does not have a strong name

Assembly generation failed -- Referenced assembly 'Interop.CDO' does not have a strong name

How do I overcome this

Any help is greatly appreciated. Thank you :-)


Re: SharePoint - Development and Programming problem publishing webpart

Stefan Keir Gordon

Hello Micheal,

This is a relatively easy fix. The problem is (clearly) that your Interops are being generated with a a strong name. We just have to sign them, or have visual studio sign them for us.

There are two ways to do this, you can generate a new interop manually and specify a key file to have it signed with. Or, supposedly there is a property somewhere in the project properties dialog where you can specify it ("wrapper assembly key file"), although I've never been able to find this option in the VS2005.

To generate a signed interop run this command from your visual studio command prompt:

tlbimp.exe MyCOMDLL.dll /keyfile:KeyFile.snk /out:MyCOMInterop.dll

Then simply remove the reference to your old interop and add this one in.

You can use the same key file you use for your webpart.






Re: SharePoint - Development and Programming problem publishing webpart

SuperSaiyanZero

Stefan Keir Gordon wrote:
Hello Micheal,

This is a relatively easy fix. The problem is (clearly) that your Interops are being generated with a a strong name. We just have to sign them, or have visual studio sign them for us.

There are two ways to do this, you can generate a new interop manually and specify a key file to have it signed with. Or, supposedly there is a property somewhere in the project properties dialog where you can specify it ("wrapper assembly key file"), although I've never been able to find this option in the VS2005.

To generate a signed interop run this command from your visual studio command prompt:

tlbimp.exe MyCOMDLL.dll /keyfile:KeyFile.snk /out:MyCOMInterop.dll

Then simply remove the reference to your old interop and add this one in.

You can use the same key file you use for your webpart.




I'm having the same problem "Assembly generation failed -- Referenced assembly 'Interop.CDO' does not have a strong name" but I can't seem to resolve it.

I don't know if this helps but I had a VB6 DLL which sent out email messages, this dll has been upgraded to VB2005 but I have several ASP pages which need to access this DLL.

I've found some articles which show you how to access a .NET DLL through ASP but I 've managed to get to the point where I compile and get the message "Assembly generation failed -- Referenced assembly 'Interop.CDO' does not have a strong name".

When I try what you've mentioned to my emailer3.dll, It says the DLL is not a type library. Any ideas which can help

Or would it be better to write the whole DLL in .NET instead of using a vb6 converted to vb2005 dll

Thanks in advance.





Re: SharePoint - Development and Programming problem publishing webpart

Stefan Keir Gordon

SuperSaiyanZero:

Sounds like your emailer .net dll uses a third-party non-.net dll.

You'll need to try the signed interop creation on that third party dll, and use it in your emailer project.




Re: SharePoint - Development and Programming problem publishing webpart

SuperSaiyanZero

thanks for the reply but it definitely doesn't use any third party dll. The dll was written originally in visual studio 6 without any third party applications. the only references in there are to the CDO.Message class.





Re: SharePoint - Development and Programming problem publishing webpart

Stefan Keir Gordon

CDO.Message is the problem unfortunately.

If you could just swap those calls out to the .net mail wrappers.

System.Web.Mail.SmtpMail.Send("from","to","subject","msg")




Re: SharePoint - Development and Programming problem publishing webpart

SuperSaiyanZero

Thank you for your reply! I made those changes last night and that was the problem! Thanks a lot.