如何避免在安装过程中执行 C# 安装项目中的关联可执行文件
我有一个与另一个 C# 项目关联的 C# 安装项目。 “自定义操作”包括关联项目的主要输出。当我安装此设置时,在安装期间关联的项目将执行两次(在卸载期间,exe 将执行一次)。我猜测这可能是由于某些属性设置造成的。提前致谢。
I have a C# setup project which is associated with another C# project. The 'custom action' includes the primary output of the associated project. When I install this setup, during installation the associated project is executed twice (during uninstall the exe gets executed once). I am guessing that it could be due to some property setting. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找出问题所在了。我已将关联项目的主要输出添加为自定义操作。将关联项目的主要输出添加到“文件系统”就足够了(关联项目的主要输出应在安装过程中复制到 TARGETDIR)。如果关联的项目具有自定义操作,则其主要输出应添加到“自定义操作”。 {安装期间两次:安装并回滚。卸载期间一次:卸载}。
Figured out the problem. I had added the primary output of associated project as custom action. It is sufficient to add the primary output of associated project to 'File System' (primary output of associated project shall be copied to TARGETDIR during installation). If the associated project has custom action then its primary output should be added to 'Custom action'. {twice during installation: Install and rollback. once during uninstall: uninstall}.