locked
Moving a DLL into the same libarery as the EXE (VS 2008 C# project) RRS feed

  • Question

  • Hi guys.
    I have a DLL wich isnt a .NET DLL in order for it to work it has to sit in the same libarery as the EXE.
    I have been told i can add a command that will autometicaly copies a file into the same liberary as the EXE.
    Does anyone knows where & how i can add such a command ?
    Tuesday, October 7, 2008 1:45 PM

Answers

  • If all you want is to copy the DLL to the destination folder, you can add it as a reference to your project (I'm surprised you haven't done that already).

    Does that answer your question? There are other ways, but they're not as elegant.

    if a problem looks too big, break it into smaller objects
    • Marked as answer by jack 321 Thursday, October 9, 2008 7:26 AM
    Tuesday, October 7, 2008 1:54 PM
  • I'm guessing you mean it has to sit in the same directory. 

    For your reference properties, make sure "Copy Local" is set to true.


    David Morton - http://blog.davemorton.net/
    • Marked as answer by jack 321 Thursday, October 9, 2008 7:26 AM
    Tuesday, October 7, 2008 3:45 PM

All replies

  • If all you want is to copy the DLL to the destination folder, you can add it as a reference to your project (I'm surprised you haven't done that already).

    Does that answer your question? There are other ways, but they're not as elegant.

    if a problem looks too big, break it into smaller objects
    • Marked as answer by jack 321 Thursday, October 9, 2008 7:26 AM
    Tuesday, October 7, 2008 1:54 PM
  • I'm guessing you mean it has to sit in the same directory. 

    For your reference properties, make sure "Copy Local" is set to true.


    David Morton - http://blog.davemorton.net/
    • Marked as answer by jack 321 Thursday, October 9, 2008 7:26 AM
    Tuesday, October 7, 2008 3:45 PM