Solved

library file help

Posted on 2011-02-20
4
833 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

730 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