如何将dll整理到ASP.NET中bin目录下的多个文件夹中? [英] How can I organize my dll's into multiple folders under the bin directory in ASP.NET?

查看:52
本文介绍了如何将dll整理到ASP.NET中bin目录下的多个文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何才能将ASP.NET应用程序的bin文件夹中的几个dll整理到单独的文件夹中,并将其保留在bin目录下,以便它们仍然可以方便地被应用程序使用,就好像它们位于目录的根目录中一样.斌?我想减少大量的dll,并将它们分组到与它们的核心用途相关的文件夹中.

How can I take several dll's in my bin folder for my ASP.NET application organize them into seperate folders and leave them under the bin directory so that they still are readily accesible to the application as if they were in the root of the bin? I want to reduce the monstrous list of dlls and group them into folders related to their core purpose.

推荐答案

通过使用web.config文件并指定

You can make your application probe other directories for loading assemblies by using the web.config file and specifying a <probing> element. I'm unclear as to whether or not this works now with website type projects, as it did not several years ago. It should, however, work with Web Application type projects.

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <probing privatePath="bin\subdir"/>
    </assemblyBinding>
   </runtime>
   <system.web>
      ....
       ....
   </system.web>
</configuration> 

这篇关于如何将dll整理到ASP.NET中bin目录下的多个文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆