简体   繁体   English

如何在Visual Studio中为多个应用程序创建安装文件?

[英]How Can I Create a Setup File for multiple applications in Visual Studio?

I have a C# application and I have some applications like MySQL, MariaDB etc. that I use with my C# application.I want to make a SETUP file that contains my C# application's EXE file and other applications' (MySQL, MariaDB ..) setup files in one setup file.That setup file will install all of these applications with one setup file. 我有一个C#应用程序,还有一些与我的C#应用​​程序一起使用的应用程序,例如MySQL,MariaDB等,我想制作一个包含我的C#应用​​程序的EXE文件和其他应用程序的(MySQL,MariaDB ..)安装程序的SETUP文件。文件放在一个安装文件中。该安装文件将用一个安装文件安装所有这些应用程序。

I have tried with Visual Studio Setup Wizard but I can't manage.Can I do that in Visual Studio?If I can, How can I do that?Should I download a visual studio extension? 我已经尝试过使用Visual Studio安装向导,但是无法管理,可以在Visual Studio中执行吗,如果可以,应该如何下载Visual Studio扩展程序?

You can create Setup by installing WIX tool and Install the Visual Studio extension and follow the WIX syntax 您可以通过安装WIX工具来创建安装程序,然后安装Visual Studio扩展并遵循WIX 语法

If you need to Include multiple EXE files in Setup you need to refer all the files that u needed in Setup. 如果需要在安装程序中包含多个EXE文件,则需要引用安装程序中所需的所有文件。

If you need to install those setup then you need to create the custom action. 如果您需要安装这些设置,则需要创建自定义操作。

you can create a separate project for a custom action and added the references to the required binaries (ie the Binaries you previously mentioned in tags) and added the corresponding dll formed in the binary tag and called it via CustomAction 您可以为自定义操作创建一个单独的项目,然后将引用添加到所需的二进制文件(即,您先前在标记中提到的Binaries),并添加在二进制标记中形成的相应dll,并通过CustomAction对其进行调用

It's not clear if you've downloaded and installed the VS 2017 Installer Extension from here: 尚不清楚是否从此处下载并安装了VS 2017 Installer Extension:

https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects

which lets you create Visual Studio installer projects (not the setup wizard). 使用它可以创建Visual Studio安装程序项目(而不是安装向导)。 I suggest you search for tutorials on setup projects if you're totally unfamiliar with them, such as: 如果您完全不熟悉设置项目的教程,建议您搜索它们,例如:

https://msdn.microsoft.com/en-us/library/cc766795.aspx https://msdn.microsoft.com/zh-CN/library/cc766795.aspx

http://www.c-sharpcorner.com/UploadFile/1492b1/creating-an-msi-package-for-C-Sharp-windows-application-using-av/ http://www.c-sharpcorner.com/UploadFile/1492b1/creating-an-msi-package-for-C-Sharp-windows-application-using-av/

https://www.red-gate.com/simple-talk/dotnet/visual-studio/getting-started-with-setup-projects/ https://www.red-gate.com/simple-talk/dotnet/visual-studio/getting-started-with-setup-projects/

In general you just drag and drop your files into (say) the Application Folder in the File System view; 通常,您只需将文件拖放到(例如)“文件系统”视图中的“应用程序文件夹”中即可; registry entries can be created using the Registry view. 注册表项可以使用“注册表”视图创建。 Prerequisites such as SQL runtime support. SQL运行时支持等先决条件。 .NET runtime are added with the setup project's properties, choosing from the list of prerequisites. 从先决条件列表中进行选择,.NET运行时将与安装项目的属性一起添加。

This will give you a basic setup with little customization. 这将为您提供几乎不需要自定义的基本设置。 There might be features you require that Visual Studio setups don't support, so something like WiX will give you a lot more functionality with a steeper learning curve if you've never created an MSI setup file before. 可能有一些功能要求Visual Studio安装程序不支持,因此,如果您以前从未创建过MSI安装程序文件,那么类似WiX的功能将为您提供更多功能,并且学习曲线更陡峭。 I would search for a tool that fits your requirement, and this thread might help: 我将搜索适合您需求的工具,该线程可能会有所帮助:

Best tool to create MSI 创建MSI的最佳工具

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

相关问题 在Visual Studio中为多个应用程序创建安装项目 - Creating a Setup Project for multiple applications in Visual Studio 在Visual Studio中创建安装文件时,为什么不能连接到SQL Server数据库? - Why can't I connect to the SQL Server database when I create setup file in Visual studio? 如何创建一个Visual Studio安装项目以安装多个Windows服务 - How to Create a visual studio Setup Project to install multiple Windows Services 如何使用SQL Server数据库在Visual Studio 2017中创建安装文件 - How to create setup file in Visual Studio 2017 with SQL Server database C#Visual Studio创建安装文件 - C# Visual Studio Create Setup file 如何在 Visual Studio 2019 中使用安装程序为 WPF 核心 3.1 创建安装程序文件 - How to create setup file for WPF core 3.1 with setup installer in visual studio 2019 visual studio中的安装文件 - setup file in visual studio 有人知道如何在Visual Studio中将安装文件添加到安装项目中吗? - someone knows how to add a setup file into a setup project in visual studio? 如何将应用程序安装文件添加到Visual Studio 2010安装程序? - How to add application setup file to visual studio 2010 setup? 如何在Visual Studio中创建加载项以从设置文件生成javascript,CSS和其他代码 - How can I create an addin in Visual Studio to generate javascript, CSS and other code from a settings file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM