1

consider scenario : I've an application :

c:\A\B\proc1.exe + proc1dll.dll

I want to run it from

c:\D\E\MyApp

now what I do is taking proc1dll.dll and put it in MyApp folder. this is surely not the proper way what am I missing here ? my code look similar to this

(just plain .exe with no input just output)

LordTitiKaka
  • 2,087
  • 2
  • 31
  • 51
  • If your exe depends on dll, and there are no some dynamic loading from some hard coded path, putting dll in the same folder of executable is most used way to do that.. – Tigran Jan 29 '15 at 13:52
  • [Working with Assemblies and the Global Assembly Cache](https://msdn.microsoft.com/en-us/library/6axd4fx6(v=vs.110).aspx) – Alex K. Jan 29 '15 at 13:55
  • 1
    "this is surely not the proper way ": why do you think that? – L-Four Jan 29 '15 at 13:55
  • @Tigran you are right in the logic but lets say just for the sake of it , I have n applications that each uses m dll files I dont want to put extra nXm dll file in my tiny not very complicated MyApp application – LordTitiKaka Jan 29 '15 at 13:56
  • @L-Three please see my comment please – LordTitiKaka Jan 29 '15 at 13:56
  • @LordTitiKaka if your application or dlls of appllication required them, don't see how you can avoid that.. – Tigran Jan 29 '15 at 13:58
  • You can merge the DLL and the EXE http://stackoverflow.com/questions/10137937/merge-dll-into-exe – rducom Jan 29 '15 at 14:06

1 Answers1

0

Not sure what you are looking for, but distributing an exe with the dll's it depends on is standard behavior.

You could create an MSI that installs the app and DLL's for you.

If you really want only the EXE, you can merge the DLL's into the EXE as described here, but I don't see a lot of advantages.

An alternative is to put the DLL's in the GAC, but then you have to sign them and be sure they are installed on every machine you use the EXE.

Community
  • 1
  • 1
L-Four
  • 13,345
  • 9
  • 65
  • 109