[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Interop.DAO error message

Posted on 2007-07-24
11
Medium Priority
?
991 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:team2005
  • 6
  • 5
11 Comments
 
LVL 18

Expert Comment

by:DarrenD
ID: 19554617
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: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_21607129.html

Hope this helps

Darren
0
 
LVL 2

Author Comment

by:team2005
ID: 19554663
Hi DarrenD

Thanks for helping me with this.

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

0
 
LVL 18

Expert Comment

by:DarrenD
ID: 19554690
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

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_21607129.html
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:team2005
ID: 19557424
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
0
 
LVL 18

Expert Comment

by:DarrenD
ID: 19557630
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
0
 
LVL 2

Author Comment

by:team2005
ID: 19557644
Hi!

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

I Called it Interop.DAO.dll

Any ide ?

0
 
LVL 18

Expert Comment

by:DarrenD
ID: 19557693
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...
0
 
LVL 18

Expert Comment

by:DarrenD
ID: 19557713
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
0
 
LVL 2

Author Comment

by:team2005
ID: 19557743
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'

?????
0
 
LVL 2

Author Comment

by:team2005
ID: 19558187
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 ?????

0
 
LVL 18

Accepted Solution

by:
DarrenD earned 2000 total points
ID: 19558881
AS far as I know you should use the Interop.DAO.dll

Hope I've been of some help to you.

Again some of these things are difficult but once you've got this done I doubt you'll ever forget....:)

Darren
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Progress
Introduction to Processes

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question