如何在 Visual Studio 中为多个应用程序创建安装文件? [英] How Can I Create a Setup File for multiple applications in Visual Studio?

查看:68
本文介绍了如何在 Visual Studio 中为多个应用程序创建安装文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 C# 应用程序,我有一些应用程序,如 MySQL、MariaDB 等,我将它们与我的 C# 应用程序一起使用.我想制作一个包含我的 C# 应用程序的 EXE 文件和其他应用程序的 SETUP 文件(MySQL、MariaDB ..) 一个安装文件中的安装文件.该安装文件将使用一个安装文件安装所有这些应用程序.

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.

我已尝试使用 Visual Studio 安装向导,但无法管理.我可以在 Visual Studio 中执行此操作吗?如果可以,我该怎么做?我应该下载 Visual Studio 扩展吗?

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?

推荐答案

不清楚您是否从这里下载并安装了 VS 2017 安装程序扩展:

It's not clear if you've downloaded and installed the VS 2017 Installer Extension from here:

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

它允许您创建 Visual Studio 安装程序项目(不是安装向导).如果您完全不熟悉它们,我建议您搜索有关设置项目的教程,例如:

which lets you create Visual Studio installer projects (not the setup wizard). 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

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/

通常,您只需将文件拖放到(例如)文件系统视图中的应用程序文件夹中即可;可以使用注册表视图创建注册表项.先决条件,例如 SQL 运行时支持..NET 运行时与安装项目的属性一起添加,从先决条件列表中进行选择.

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. .NET runtime are added with the setup project's properties, choosing from the list of prerequisites.

这将为您提供一个基本的设置,几乎没有定制.您可能需要一些 Visual Studio 安装程序不支持的功能,因此,如果您以前从未创建过 MSI 安装程序文件,那么像 WiX 之类的东西将为您提供更多功能和更陡峭的学习曲线.我会寻找适合您要求的工具,此主题可能会有所帮助:

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. I would search for a tool that fits your requirement, and this thread might help:

创建 MSI 的最佳工具

这篇关于如何在 Visual Studio 中为多个应用程序创建安装文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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