How Do I Use These .dll Files In My Visual Studio Project?

123 views Asked by At

I am working with a C# version of ncurses called Curses Sharp. So far, I've been following the instructions on how to properly install it.

Through these instructions, I've been able to generate the following files:

enter image description here

When I try to add these as project references in Visual Studio 2019, however, only CursesSharp.dll will import. Attempting to import CursesWrapper.dll results in this error:

enter image description here

This file is necessary for the functioning of CursesSharp. However, I can't find anything online about how to properly import a wrapper into Visual Studio, or what I'm doing wrong. Any help is much appreciated.

Attempting to add just CursesSharp resulted in this error:

enter image description here

1

There are 1 answers

2
PMF On

You don't need to reference that library directly. It appears tha CursesWrapper.dll is a C++ library that's imported by CursesSharp.dll via P/Invoke (native calls). Just reference CursesSharp.dll and you will be fine. The other library just needs to be present, but it is found automatically.