views:

113

answers:

1

I have 2 projects in my solution. The first one is a console application, and the second is a dll, used (referenced) by the console. When I build my solution (release) I get one EXE file and one DLL file, because "copy local" is true (if I set it to false, it doesn't run)

How can I store that DLL file in a subdirectory? If my output folder is C:\123\, and there's the EXE file, I want all my DLLs to be in C:\123\Dll\

+3  A: 

You should be able to use the probing element to specify which paths your application should use when attempting to resolve dll dependencies.

Example:

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="123;123\dill"/>
      </assemblyBinding>
   </runtime>
</configuration>

Also you can use the Post-build event command line to copy your dll's to a particular directory.

Mark