简体   繁体   English

在安装过程中如何避免在C#安装项目中执行关联的可执行文件

[英]How to Avoid execution of associated executable in C# setup project during installation

I have a C# setup project which is associated with another C# project. 我有一个与另一个C#项目关联的C#安装项目。 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). 当我安装此安装程序时,在安装过程中关联的项目将执行两次(在卸载期间,exe将执行一次)。 I am guessing that it could be due to some property setting. 我猜可能是由于某些属性设置。 Thanks in advance. 提前致谢。

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). 将关联项目的主要输出添加到“文件系统”就足够了(关联项目的主要输出应在安装过程中复制到TARGETDIR)。 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}. 一次在卸载过程中:卸载}。

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

相关问题 C#项目:如何向该项目添加可执行文件? - C# project : How to add an executable to the project? 如何在执行C#Azure功能期间避免SqlClient超时错误? - How can I avoid a SqlClient timeout error during execution of a C# Azure Function? 如何使用正确的目录在C#中执行项目 - How to executable project in C# with right directories 如何在 C# Class 库项目中的测试执行期间查看控制台 output - How to see the console output during a test execution in C# Class Library Project 如何使用安装项目在安装过程中传递文件夹路径(不是安装文件夹) - how to pass folder path (not installation foler) during installation using setup project 如何避免C#项目中的代码重复 - How to avoid code duplication in c# project C#WPF项目,如何避免InvalidOperationException? - C# WPF project, how to avoid InvalidOperationException? 如何在Windows Installer安装过程中运行第三者exe(使用安装和部署项目) - how to run a 3rd party exe during a windows installer installation (using setup and deployment project) 如何使用 Visual Studio Code 创建新的可执行 C# 项目 - How to create a new executable C# project with Visual Studio Code 使用Visual Studio安装项目在安装过程中删除特定文件 - Delete specific files during installation using visual studio setup project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM