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

回眸只為那壹抹淺笑 提交于 2021-01-28 06:06:51

问题


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.

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?


回答1:


You can create Setup by installing WIX tool and Install the Visual Studio extension and follow the WIX syntax

If you need to Include multiple EXE files in Setup you need to refer all the files that u needed in Setup.

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




回答2:


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

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-a-v/

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

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:

Best tool to create MSI



来源:https://stackoverflow.com/questions/47411249/how-can-i-create-a-setup-file-for-multiple-applications-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!