psgviscom
psgviscom

Reputation: 9

Adding reference to c#

In my application i want use CAVEditLib.dll reference.But i can't find the library in COM reference.I am getting error as "Error 1 The type or namespace name 'CAVEditLib' could not be found (are you missing a using directive or an assembly reference?)"

What may the problem?

Upvotes: 0

Views: 677

Answers (4)

Kishore Kumar
Kishore Kumar

Reputation: 12874

Put your CAVEditLit.dll in the debug folder of your project.

One more thing you can do is.. In Visual Studio Menu


Project

Add Reference

and then in the new dialog click on the Browse tab and select your dll.

This will help you.

Upvotes: 1

Răzvan Flavius Panda
Răzvan Flavius Panda

Reputation: 22106

To use an external library in your code you need to:

  1. Add a reference to it.

  2. Add a using in the code file where you are using the library.

    using CAVEditLib

Upvotes: 1

Rodrigo Vedovato
Rodrigo Vedovato

Reputation: 1008

Have you tried to register your library? Go to the command prompt, cd to the folder where your library is located and execute "regsvr32 /i CAVEditLib.dll". This should work

Upvotes: 1

Nick Ryan
Nick Ryan

Reputation: 2670

Try putting CAVEditLib.dll in a lib folder in the same folder as where your solution resides then instead of adding a COM refrence, use "Browse" and add the reference from the actual file.

Upvotes: 1

Related Questions