Solved

library file help

Posted on 2011-02-20
4
809 Views
Last Modified: 2012-05-11
Hi,

I was wondering if someone can help. I have created a class library and generated (.tlb) file within visual studio and have successfully managed add this to a project that I need to use this file (within microsoft access).
The only problem is when I make the call to the class within this it’s looking for a reference within that library. I have tried copying all the files from my release folder to the location where I have the access database application without any success.

The message is "could not load file or assembly or one of its dependencies. The system can not find the specified file". I am really not sure what i need to do.

Any help would be appreciated.

Regards,

Ross
0
Comment
Question by:ross13
  • 2
4 Comments
 
LVL 75
ID: 34938485
As similar issue just came  up a couple of days ago.  Possibly info in this Q may help ...

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26831994.html?cid=1137

mx
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 500 total points
ID: 34939312
If you don't create strong key name for your library you have to place the dll into the same directory. In your case it would have to be the same directory as Excel.exe. If you want to avoid that then give your assembly a strong name.

Project properties > Signing Tab > checkmark "sign the assembly" in the dropdown select <"New"> on the next dialog type in name of your library then un-check "Protect my key with password". click OK. Recompile.

Then you need to use RegAsm.exe with the /codebase switch. This allows mscore to locate your library any place on the system.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe "C:\mylib.dll" /tlb:mylib.tlb /codebase
PAUSE

Open in new window

0
 

Author Comment

by:ross13
ID: 34939381
Hi,

I asked another question the other day that allowed me to add this reference this via the access application by creating a .TBL file:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26831994.html

I then tried to call a class within this and the access application gave the following message:
"could not load file or assembly or one of its dependencies. The system can not find the specified file”

The message gave the name of another .dll file that I reference in the visual studio application that I compiled as a .TBL file.

Do I need to regasm each of the other .dll files that I added into that project?

Thanks again

Ross
0
 
LVL 75
ID: 34940161
Sorry ... I didn't see you were the same person who asked the previous Q.

mx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now