Visual Studio安装项目中的自定义操作执行 [英] Custom Action execution in a Visual Studio Setup Project

查看:126
本文介绍了Visual Studio安装项目中的自定义操作执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一段时间创建的VS安装项目。我已复制并修改它以使用更新的代码集。原始安装程序将在安装新版本和版本升级时运行自定义操作(安装和提交)(删除旧版本)。



我复制的版本和modified在新安装上运行自定义操作,但是当我尝试升级旧版本时,自定义操作永远不会执行。我已经放入了消息框以验证代码是否未执行。



我确定我错过了设置自定义操作的一部分,但我不知道是什么。我已经比较了自定义操作(安装程序类)代码和安装项目,但它们似乎匹配。



有没有人知道为什么自定义操作不会在升级时调用?

I have a VS Setup project that was created a while back. I have copied and modified it to work with a newer set of code. The original setup would run the custom actions (Install and Commit) when it was installed new and on a version upgrade (removing the older version).

The version I copied and modified runs the custom action on the new installation, but when I try to upgrade the older version the custom actions never execute. I have put message boxes in to verify the code is not executed.

I am sure I am missing a part of setting up the custom action but I have no idea what. I have compared both the custom action (installer class) code and the setup project, but they seem to match.

Does anyone have an idea why the custom actions would not be called on an upgrade?

推荐答案

您必须在Orca等工具中打开构建的msi,并检查自定义操作条件。最有可能的是,它们设置为在升级期间不运行。



参考此链接 - > [ ^ ]有关如何记录安装的信息。



-Alpesh
You will have to open up the built msi in tools such as Orca, and check the custom action conditions. Most probably, they are set such a way that they do not run during upgrades.

Refer to this link --> [^] for information on how to log the install.

-Alpesh


在网上搜索更多内容后,我发现Visual Studio中存在一个错误,它将运行以前版本的CA而不是新版本。您必须更改新CA的名称才能运行。



重命名CA项目后,它开始运行。
After searching more on the web, I found that there is a bug in Visual Studio that will run the previous version of the CA not the new one. You must change the name of the new CA for it to run.

Once I renamed the CA project it started running.


这篇关于Visual Studio安装项目中的自定义操作执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆