Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add an EXE file to a project, so that it will be copied to the Bin/Debug folder just like a DLL?

I need my C# project to launch another EXE program during execution. This executable needs to be placed in the same folder as the C# program is placed on building the solution, for example, the debug folder -- just like DLL file references -- so that when my team members check the project out from TFS, and debug, the EXE is found when my C# code tries to call it.

However, the EXE is not a reference per se, and so it cannot be added as a reference, even though I want it to be copied around in the same manner as a reference.

Is there a reasonable solution for this problem?

Thanks in advance.

like image 536
John Avatar asked Sep 10 '13 20:09

John


1 Answers

You can go the properties of the file, and under Copy to output Directory select, copy if newer

enter image description here

like image 160
Habib Avatar answered Oct 02 '22 16:10

Habib