简体   繁体   中英

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?

尝试将CAVEditLib.dll放在解决方案所在的lib文件夹中,然后使用“浏览”并添加来自实际文件的引用,而不是添加COM引用。

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM