简体   繁体   English

Visual Studio安装程序项目中的其他安装程序

[英]Additional Setup in Visual Studio Installer Projects

I am trying to create an installation for my project. 我正在尝试为我的项目创建安装。 I am using MS Access DataBase and for it to work Access DataBase Engine is required. 我正在使用MS Access数据库,并且要使其正常工作,需要访问数据库引擎。 If i download that engine https://www.microsoft.com/en-us/download/details.aspx?id=54920 from here and install it, program works. 如果我从此处下载该引擎https://www.microsoft.com/zh-cn/download/details.aspx?id=54920并进行安装,则该程序可以运行。

How can i add that installation to my installation? 如何将该安装添加到我的安装中?

I am using Visual Studio 2015, C# and OLEDb. 我正在使用Visual Studio 2015,C#和OLEDb。

Short Version : In essence you will need a deployment tool . 简短版本质上,您将需要部署工具 List view of major deployment tools . 列出主要部署工具的视图 Maybe that list view is the easiest overview? 也许列表视图是最简单的概述? (a sense of scope). (范围感)。 Much more detail below (and too many links too). 下面有更多详细信息(链接也太多)。


Details : There is some prerequisite functionality available in Microsoft Visual Studio 2017 Installer Projects , but I am unfamiliar with the details. 详细信息Microsoft Visual Studio 2017 Installer Projects提供了一些必备功能,但我不熟悉这些详细信息。 I find this project type inadequate for real deployment work for a lot of reasons (lacking features and some odd implementations). 由于许多原因(缺少功能和一些奇怪的实现), 我发现此项目类型不足以进行实际的部署工作。 More on this here - a few concrete problems to consider . 这方面的更多信息 -需要考虑的一些具体问题

Several commercial tools will do this for you with special features to help make it quick(er). 有几种商业工具将为您提供特殊功能,以帮助您更快地完成这项工作。 I verified that Advanced Installer can do it (and here is a great gateway to all things Advanced Installer. Some free features available). 我验证了Advanced Installer 可以做到here is a great gateway Advanced Installer所有功能here is a great gateway一些可用的免费功能 )。 I assume Installshield can do it as well (certainly for other runtimes, didn't verify this particular one). 我假设Installshield也可以做到这一点(当然,对于其他运行时,未验证这一特定运行时)。 Generally it will be handled by a setup.exe bootstrapper / chainer embedding all runtimes along with your own MSI file(s). 通常,它将由setup.exe引导程序/链接程序处理,该程序将所有运行时以及您自己的MSI文件嵌入。

In other tools , you will have to do it yourself, by figuring out command lines and how to handle error conditions. 在其他工具中 ,您将必须自己弄清楚命令行以及如何处理错误情况。 There are some hints here (not tested by me - a google sweep will give you more): https://www.itninja.com/software/microsoft/access-runtime/2016-1 这里有一些提示(未经我测试-谷歌扫描将为您提供更多信息): https : //www.itninja.com/software/microsoft/access-runtime/2016-1

Get more command line info by going accessruntime_4288-1001_x64_en-us.exe /? 通过访问accessruntime_4288-1001_x64_en-us.exe /?获得更多命令行信息accessruntime_4288-1001_x64_en-us.exe /? :

命令行访问2016

WiX is free and open source - with a relatively hefty learning curve if you don't know MSI, and contains a bootstrapper feature called " Burn ". WiX是免费的开放源代码-如果您不了解MSI,则学习曲线相对较重,并且包含称为“ 刻录 ”的引导程序功能。 Here is the documentation for: How To: Install the .NET Framework Using Burn (first read the "Building Installation Package Bundles" instructions in "Step 1"). 这是有关以下内容的文档: 如何:使用刻录来安装.NET Framework (首先阅读“步骤1”中的“构建安装软件包捆绑包”说明)。 A real-world Burn sample . 真实的Burn样本 And some sample source markup . 以及一些示例源标记

Some developers recommend the dotnetinstaller bootstrapper . 一些开发人员推荐dotnetinstaller bootstrapper Not something I know much about. 我不太了解。 It is just a bootstrapper. 这只是一个引导者。 Runs things in sequence for you. 为您依次运行事物。

If you are doing in-house or ad-hoc deployment, even a batch file could do the job I suppose, but if you do that for a real product for large-scale and generalized deployment I would be very worried indeed. 如果您要进行内部部署或临时部署,即使批处理文件也可以完成我想做的工作,但是如果您为真正的产品进行大规模和广义的部署而这样做,我确实会非常担心。 If there is one thing we hate as deployment specialists, I'd say it is batch files embedded in packages . 如果我们讨厌作为部署专家的一件事,我会说这是嵌入在package中的批处理文件 Batch files (and scripts) are system administrator tools, not general deployment tools. 批处理文件(和脚本)是系统管理员工具,而不是常规部署工具。


Some Older Links: 一些较旧的链接:

Visual Studio setup projects have a Prerequisites choice in the project's properties. Visual Studio安装程序项目在项目的属性中具有“先决条件”选项。 This allows you to choose from a list of standard prerequisites and generate a setup.exe that will install the prerequisites and then install your MSI. 这使您可以从标准先决条件列表中进行选择,并生成setup.exe,它将安装先决条件,然后安装MSI。 The Access Runtime doesn't appear in later versions of setup projects because (I assume) Access 2013 ended mainstream support in 2018. The way to add your own prerequisites to this mechanism was with the Bootstrap Manifest Generator, which is perhaps still available but not well documented: Access Runtime未出现在更高版本的安装项目中,因为(我假设)Access 2013在2018年终止了对主流的支持。向此机制添加自己的先决条件的方法是使用Bootstrap清单生成器,它可能仍然可用,但不有据可查:

https://msdn.microsoft.com/en-us/library/ms165429.aspx https://msdn.microsoft.com/en-us/library/ms165429.aspx

Apart from that I'd recommend that you learn how to build a WiX Burn bootstrapper executable that will install the Access Runtime and then install your MSI (which you still build with Visual Studio if you need to). 除此之外,我建议您学习如何构建WiX Burn引导程序可执行文件,该可执行文件将安装Access Runtime,然后安装MSI(如果需要,您仍可以使用Visual Studio来构建它)。 If you do a search for that you'll find this kind of thing: 如果您进行搜索,就会发现这种情况:

WiX - Install Prerequisites and 3rd party applications WiX-安装先决条件和第三方应用程序

https://www.c-sharpcorner.com/UploadFile/cb88b2/installing-prerequisites-using-wix-bootstrapper-project-and/ https://www.c-sharpcorner.com/UploadFile/cb88b2/installing-prerequisites-using-wix-bootstrapper-project-and/

These will explain how to build the Xml to check whether the Access Runtime is installed and the command to use to install it. 这些将说明如何构建Xml以检查是否已安装Access Runtime以及用于安装它的命令。 This is a much better choice than the Bootstrap Manifest Generator. 这比Bootstrap清单生成器好得多。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM