• asp.net中bin目录下的 dll.refresh文件


    首先找到了这篇文章http://www.cnblogs.com/haokaibo/archive/2010/07/31/1789342.html

    然后找到一篇英文的文章http://monsur.xanga.com/2006/02/03/dll-refresh-and-asp-net/

    The question is so simple I wonder why I haven’t encountered it before:  If web projects in Visual Studio 2005 don’t have project files, how do they know where to get external references?  (Ok, well I guess the question isn’t that simple).

    For example, suppose I have three dlls on a network share that I want to include in my web project.  I can do this using “add reference”.  But without a unifying project file, how does the next person know to load those same three references?

    The usual suspects include the solution file and the web.config.  But the solution file contains only solution level information.  And while the web.config file has an “assemblies” section, it has nothing to do with external references.

    It turns out, the answer lies in these simple but scary *.dll.refresh files that litter the bin directory.  Every time you add an external reference, you’ll find a dll.refresh file right next to it.

    They are simple because if you view them in a text editor, you’ll see they contain nothing more than the full path to the dll.

    They are scary because I’ve never seen them before, and we are conditioned to never, ever check your bin directory into source control.  In fact, I’ve been saying “WTF are these stupid refresh files!?” and then promptly deleting them.

    Turns out, these dll.refresh files are an exception to the rule, and they should go into source control.  Its the only way your web project will know where its references live.

    I can’t really find much information about these little files, just this bug report:

     

    Thank you for your feedback. This is actually by design. If you are using source control, you do not want to store dynamically changing files such as a dll or pdb file. However, the refresh file contains information on where to get the dll and pdb, and should be saved. BTW, the presence of a refresh file indicates that the dll and pdb is dynamic and can change. If you do not have a refresh file, this indicates the dll and pdb are not dynamic. In this case, the dll and pdb *will* be checked into source control.

    In the meantime, the ASP.NET team is working on a Web Application project for Visual Studio 2005.  This takes the best parts of VS2003 and fuses it with the best of VS2005 and ASP.NET 2.0.  This includes a single project file for the web project, which gets around the dll.refresh file issue.

    中文的文章提出的解决方法是,另外建立一个文件夹,单独来存放第三方的dll

  • 相关阅读:
    MySQL客户端mysqladmin命令
    13 Linux磁盘管理
    12 Linux软件管理
    11 Linux压缩打包
    09 Linux输入输出
    08 LinuxACL控制
    07 Linux特殊权限
    06 Linux基本权限
    05 Linux用户管理
    04 Linux文件编辑
  • 原文地址:https://www.cnblogs.com/chucklu/p/4784446.html
Copyright © 2020-2023  润新知