Adding DLL Referenced in a C # Executable

2

I've developed a console application in C # that makes use of a referenced dll. After doing the batch build and generating the application executable, I tried to run it on a computer that did not have this dll, of course an error occurred. Right after that I passed the dll to the computer and left it in the same .exe folder and so it happened.

I know I need to somehow link this dll at the time of the build, or something like that, but I do not know how. I would like to know how to generate this executable so that it works on another computer?

    
asked by anonymous 08.05.2014 / 22:04

1 answer

1

Before giving batch of the application, go in your reference and do the following:

Right click on it and go to properties, after that change the Copy Local to TRUE

Make your batch and you'll see that dll is now duplicated in your application, send it to the other computer and that's it.

    
08.05.2014 / 22:23