简体   繁体   English

Visual Studio 2010安装项目不会更新依赖的DLL

[英]Visual Studio 2010 setup project does not update dependent DLLs

I have a solution S with contains executable X, and class library projects L1, L2, ... There is also a setup project P, and if I look in the Detected Dependencies folder of PI see L1.dll, L2.dll... P is set to remove previous versions if installed. 我有一个包含可执行文件X的解决方案S,以及类库项目L1,L2,...,还有一个安装项目P,如果我在PI的Detected Dependencies文件夹中查看,请参阅L1.dll,L2.dll。 。P设置为删除以前的版本(如果已安装)。

Next, I run the installer I built from P. I set the output directory to be a non-standard one (so X can write log data and so on to the install location). 接下来,我运行从P构建的安装程序。我将输出目录设置为非标准目录(这样X可以将日志数据等写入安装位置)。 All is well. 一切都很好。

Now I change one of the libraries, and part of X. Rebuild X. Rebuild P. I re-run the installer, and point it at the same directory as before. 现在,我更改其中一个库以及X的一部分。重新构建X。重新构建P。我重新运行安装程序,并将其指向与以前相同的目录。 X.exe seems to be updated, but L1.dll is still the old version. X.exe似乎已更新,但是L1.dll仍然是旧版本。 Any suggestions as to why? 有什么建议吗?

Try refreshing the dependencies on you setup project P (expand setup project P, context click on "Detected Dependencies" and select "Refresh Dependencies"), this will force the update of the dependent libraries. 尝试刷新安装项目P上的依赖项(展开安装项目P,在上下文中单击“ Detected Dependencies”,然后选择“ Refresh Dependencies”),这将强制更新从属库。 I am not entirely certain why this does not occur naturally, but I believe it may have to do with the build and deploy options within the solution's configuration manager. 我不能完全确定为什么这种情况不会自然发生,但是我认为这可能与解决方案的配置管理器中的构建和部署选项有关。

I have a number of windows mobile applications in Visual Studio 2008 and as a precaution I always refresh the dependencies before creating a new production installer. 我在Visual Studio 2008中有许多Windows Mobile应用程序,作为预防措施,我总是在创建新的生产安装程序之前刷新依赖项。 I have had cases similar to yours and it can be very confusing to figure out why your software is not doing what you expect. 我曾遇到过与您类似的案例,弄清楚为什么您的软件没有按照您的期望做事可能会非常令人困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM