0

This is a question for which I need someone to give me some pointers and point me in the right direction. Not a "suggest-a-sulution-code" question:

How do I create a stand-alone release of a C# Windows Froms application that uses a couple of NuGet packages AND an external library (AutoIT)?

The application is a simple forms application which uses Selenium Webdriver for opening and accessing a browser. In addition to this, it uses a library called AutoIt, for handling windows operations.

In my VS project I've installed Selenium Webdriver with NuGet, and added the AutoIt libraries manually as externals.

The resulting .exe file created after build does not work on another computer when I just copy it over. The GUI and functionality works, but the AutoIt library is not included. This is probably logical, and due to my lack of knowledge regarding building windows applications. But how do I do this? How do I build a release which can be used by others, which includes any external libraries used by the application? Do I have to manually get all DLL files relatedt to the project, or is there a way to package things to make it easier?

  • 1
    Did you only copy the .exe file, or did you also copy the external dlls? In most cases all files needed to execute the program will be copied to the ../release/bin/ folder – Tobias Theel Nov 23 '17 at 09:57
  • 3
    Select your DLL in solution and in properties window Select Copy to Output Directory option to Copy if newer – Sonikas Nov 23 '17 at 09:58
  • 1
    Possible duplicate of [How to make an installer for my C# application?](https://stackoverflow.com/questions/2251062/how-to-make-an-installer-for-my-c-sharp-application) – Liam Nov 23 '17 at 10:00
  • 1
    As others have pointed out you can just include any dll references in the output folder. The webdriver api (dlls) isn't your only issue in using selenium, you'll need a copy of whatever browser your targeting, etc. Selenium setup can be quite complicated. If you want a point and click installation you'll need an installer package – Liam Nov 23 '17 at 10:03
  • 2
    Possible duplicate of [How to create an .exe file from Windows Forms](https://stackoverflow.com/questions/34255864/how-to-create-an-exe-file-from-windows-forms). To add to this answer, copy every `*.dll` as well. – Camilo Terevinto Nov 23 '17 at 10:04

0 Answers0