0

I am using Visual Studio 2012.

I have 10 projects referenced in Main project of my application. Now those project dlls are automatically copied to "Debug" folder when building, but I want some of them in "Debug\Modules".

Is there any way I could stop copying any specific DLL on building or copy that specific DLL to another folder.

Currently I am copying DLL from "Debug" folder to "Debug\Modules" in the Post Build event.

Can it be done any other way.

I don't want any solution on how I can look/load from different folder, but a way to just move them in a different folder while building.

JAL
  • 41,701
  • 23
  • 172
  • 300
XYZ
  • 119
  • 1
  • 12
  • I doubt that's possible, considering [Dynamic-Link Library Search Order](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx). – BCdotWEB Feb 25 '15 at 14:35
  • @BCdotWEB the article you posted is about Win32 DLLs, not .NET assemblies. – Panagiotis Kanavos Feb 25 '15 at 15:01
  • Why do you want to do that? Using specific folders for dlls has to do with packaging, not compiling a project. .NET can search custom folders but it's your packaging tool's job to put the dlls there. If you want to do that in the build setp, you *can* change the target folder for references by directly modifying the `.csproj` file – Panagiotis Kanavos Feb 25 '15 at 15:07
  • My application is not deployed by packing. We initially set a release and then used to replace dlls to client machine manually which are changed. – XYZ Feb 26 '15 at 06:18

1 Answers1

0

If you want to copy dll to another folder, you should know that it's possible and you can do this.

The easiest way to set this up is to use a post build event. These run once a build is successfully completed and has a set of handy macros to make access to common outputs, like compiled files, very easy

Read here. It's the source of that.

Hope it helps

Community
  • 1
  • 1
Ali Vojdanian
  • 2,067
  • 2
  • 31
  • 47