This article is a mirror article of machine translation, please click here to jump to the original article.

View: 38548|Reply: 2

[Source] The impact of the dll.refresh file when referencing the project class library

[Copy link]
Posted on 5/4/2020 8:42:50 PM | | |
As we all know, .net programs will generate .dll files in the bin directory after they are generated, but where does the file .dll.refresh come from? I googled boredom that day and found out that this is automatically generated when referencing a third-party assembly (direct) in your project, this .refresh file stores the original file path of that third-party file, if the dll under this path is updated, vs when the project is generated, the assembly will be updated and changed according to this address. Without this file, VS will not be able to update the referenced assembly according to the latest status, which will cause the problem of the assembly version being incorrect. A small detail will lead to a big problem, everyone pay attention!

A new version of the website was released, and a serious issue was discovered where one of the libraries was not automatically updated, but an outdated version was automatically generated.

After investigation, it turned out to be related to a dll.refresh file in VSS.

The reason is simple:

1。 During the development process, when other external DLL references are added to the website, the system automatically generates the refresh file, and this file will not be generated if other project DLL references are added under this solution

2。 The refresh file specifies the path to automatically update the dll, and if it is a library reference, it will specify the Dubug or Release directory, and the file that is errored this time is the Debug directory

3。 The developer mistakenly checked the file into the VSS codebase

4。 The problem is, the reference library has changed many times after the release of the first version, but the interface has not changed, so the library is generated separately, and then only the corresponding DLL (Release version) of all applications is updated, and there has been no problem, but when an application is republished, due to the existence of a refresh file in the BIN directory of the project, the DLL is automatically updated with the path specified by the file, which leads to the release of the old version DLL (Debug version).

Problem Solving:

Delete the dll.refresh file in the app and republish the app

Or modify the content in dll.refresh, and write the dll path correctly





Previous:Database schema: Read and write separation to CQRS
Next:npm method of setting up and canceling proxies
 Landlord| Posted on 5/4/2020 8:44:32 PM |
Referencing an external dll file in VS2005 produces an extension called .refresh,
If you reference a System.Web.Extensions.dll, it will automatically generate a System.Web.Extensions.dll.refresh, which contains the absolute path of this dll.
Note: After deleting, VS2005 will not automatically update the dll you reference through the file path to the bin directory. This means that if the dll you referenced is updated, you will have to manually re-reference it yourself.
 Landlord| Posted on 5/17/2020 11:51:33 AM |
test
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com