zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    linux系统安装CRT上传插件
    一些常用的vim编辑器快捷键:
    IDS 源镜像端口添加
    查看windows、linux的SN
    Tomcat安装
    puppet配置问题统计
    使用puppet
    安装puppet
    XML 生成一个XML文件
    winform 重新启动程序(重新登录)
  • 原文地址:https://www.cnblogs.com/chucklu/p/4784446.html
Copyright © 2011-2022 走看看