Link to home
Start Free TrialLog in
Avatar of team2005
team2005

asked on

Interop.DAO error message

Hi!

Have made a application in visual basic 6.0. And have imported this project to vb.net
Visual Studio 2005.

After i have fixed som errors and warnings, i get this error message when trying my application.

Unable to emit assembly: Referenced assembly 'Interop.DAO' does not have a strong name

What does this error meen ???

Please help me ASAP...

Thanks
Avatar of Darren
Darren
Flag of Ireland image

Hi,

Have a look at this.

http://geekswithblogs.net/mchroman/archive/2005/08/18/50576.aspx
You need to run the command on the COM type library (i.e. Test.dll), not the .NET interop library.

PAQ: https://www.experts-exchange.com/questions/21607129/Unable-to-emit-assembly-Referenced-assembly-'Interop-Test'-does-not-have-a-strong-name.html

Hope this helps

Darren
Avatar of team2005
team2005

ASKER

Hi DarrenD

Thanks for helping me with this.

What DLL file do i do this with ?
Can you give me example for this. Thanks

Hi,

As stated above you need to run the command on the COM type library (i.e. Test.dll), not the .NET interop library.

I haven't done this myself before I just did a search on EE and found a PAQ.

Hope this helps.

Just read through this from start to finish

https://www.experts-exchange.com/questions/21607129/Unable-to-emit-assembly-Referenced-assembly-'Interop-Test'-does-not-have-a-strong-name.html
hi!

tryed your link, and did what they say there.
Mustent i add this dll-file to my project ?

thanks for helping me out here
Once you've done the strong naming to the DLL then you can probably just add a reference to it again and this time it should work.

There will still be an interop.yourdll.dll.

Unfortunately as I said I haven't done this before so I can only go on what I've read as well.

Let me know how you get on.

Darren
Hi!

Okey, but can't find the DLL file i just created
???

I Called it Interop.DAO.dll

Any ide ?

Can you do a search for it?

With the advent of .net, we are still forced to deal with com.  Unfortunately, when you interop a file in .net, the new interop assembly does not get strong named.  It is a good practice to strong name that interop assembly.  Here is how.

1.  In your Path, add a path to the sdk/bin folder( in the Visual Studio .NET 2003 folder).
2.  Go to a command prompt
3.  Create a key by using the sn.exe (sn -k KEYFILENAME.SNK) -> Press Enter
4.. Type in tlbimp COMDLLNAME /keyfile:YOURKEYFILE.snk /out:NEWDLL.dll ->Press Enter
5.  Type exit -> Press Enter

Did you perform these steps and no DLL was created? Seems wierd...
Don't call it interop.yourdll.dll.

If your COM Dll is called TEMP.DLL

Then

tlbimp TEMP.DLL /keyfile:YOURKEYFILE.snk /out:TEMP1.DLL

Then do a search for TEMP1.DLL and let me know what you get. if anything....

Darren
Hi!

Yes, but when i trye this in a command promtt window. I can see what is going on
Here is what the command say:
C:\tlbimp Interop /keyfile:KEYFILENAME2.SNK /out:Interop.DAO.dll
Microsoft (R) .NET Framework Type Library to Assembly Converter 2.0.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

TlbImp : error TI0000 : Unable to locate input type library: 'Interopp'

?????
Hi Again!

Find out that when i copied a file (library file) to example: D:\wbemdisp.tlb
And use this like this:

C:\tlbimp D:\wbemdisp.tlb  /keyfile:KEYFILENAME2.SNK /out:Interop.DAO.dll
All WORKS FINE....

But witch tlb-file must i use ? Interop.DAO ?????

ASKER CERTIFIED SOLUTION
Avatar of Darren
Darren
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial