vs c# Publish doesn't register my .dll

1.3k Views Asked by At

I'm using Visual Studio to "Publish" my application, but when I install it on another PC I get an error for a missing .DLL

Is there a setting in the properties that I'm overlooking maybe?

This is very frustrating because on my development PC it works.

Solution Explorer

It is called FK623Attend.dll

FKAttendDLL.cs Code

This is the FKAttendDLL.cs Code

DLL Properties

This is the DLL Properties

The Original Program doesn't have the DLL in the solution... It was registered during installation.

Thanks in advance

2

There are 2 best solutions below

0
PrathapG On BEST ANSWER

right click on the dll and go to properties. then set "Copy to Output directory" to " always copy" .then publish... Let me know if it works

1
Sami Kuhmonen On

If it is a managed dll (.NET assembly) it should be added as a reference to the project and not as a file. If it’s a native DLL that just needs to be included, check the properties of the file and make sure the settings for copying are either Copy always or Copy if newer and type is Content. Otherwise the file is ignored.