2

I've got a big solution with many projects in it. So when it builds it copies many libraries to the build's output directory. How can I specify some DLL file's output directory?

For example:

./OutputDir/Libraries/[and here we have some DLL files]

./OutputDir/Program.exe.

An XCOPY post-build action helps me to copy all DLL files into another directory. Here it is post-build action:

mkdir "$(ProjectDir)bin\$(ConfigurationName)\Libraries"

xcopy "$(ProjectDir)bin\$(ConfigurationName)\*.dll" "$(ProjectDir)bin\$(ConfigurationName)\Libraries"

How should I link those DLL files to an executeable?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
korovaisdead
  • 6,271
  • 4
  • 26
  • 33
  • 1
    Your update is totally another question. Is about Assembly Binding. Here is the bible: http://msdn.microsoft.com/en-us/library/aa720133.aspx – Angelo Badellino Jun 12 '12 at 13:39

1 Answers1

6

You can set output file at project settings or you can overwrite that at build time with /property:OutputDir=OutputDir\Libraries.

If you need a copy of a dll you can do it with a post build action.

Fedor Hajdu
  • 4,657
  • 3
  • 32
  • 50