开发者

Change Dll Folder In Visual Studio 2008 C#

I have 2 projects in my solution. The first one is a console application, and the second is a dll, used (referenced) by开发者_StackOverflow中文版 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\.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜