Some information about updating files after trial and error. These experiments were performed using Visual Studio 2012. Links were added to the C # asp.net web project.
As discussed, adding an assembly reference through a view adds a .refresh file. However, if there are additional dependent DLLs on the explicitly added DLL in the directory that you are adding, dependents are also implicitly added, but without .refresh files! So, for example, I add a link to "MyAssembly.dll", I will also get "MyAssembly.dll.refresh". But if there is an assembly "MyDependentAssembly.dll" that "MyAssembly.dll" depends on the fact that I will not get "MyDependentAssembly.dll.refresh". So what happens is that one assembly is updated, but not its dependents! You have to add the DLL one by one in the reverse order of dependency, and then everything will work better.
Some other things to keep in mind. Adding "MyAssembly.dll" will also add "MyAssembly.pdb" if one is present. In addition, "MyAssembly.xml" will be added to the links, if present. These two files will be updated when "MyAssembly.dll.refresh" is present.
But when does Visual Studio decide to search for update files? Now remember that in a web project, the project file does not track a specific DLL link. You will not find the DLL specified in the project files for projects only. So, when does the update happen?
The answer to the question of when the update occurs is at build time, when it is necessary to download a downloadable link. This means that creating a pre-created updatable website may not capture all the DLLs. I continued to have a DLL that was not updated, and then I realized that it was only used inside the .ascx file. Removing the "Allow precompiled site for update" checkbox on the MSBuild Options project page fixed this problem for me.
However, if you add links to DLLs that are loaded via reflection in your code, they will not be updated via the link. You will need to use build events to copy them to the bin directory.
Jack D Menendez Apr 11 '16 at 21:27 2016-04-11 21:27
source share