MSI vs nuget packages: which are is better for con

2018-12-31 08:24发布

Let's discuss following topic. There is application which currently is being deployed with good to know xcopy method.This approach makes difficult to manage dependencies, file updates etc. There is idea to start application deployment with help of some packages, you know like you do in Linux with help of RPM, but for Windows.

So I have question: what package system is better to use on windows classic windows installer (msi) or nuget or something else?

2条回答
无色无味的生活
2楼-- · 2018-12-31 09:05

MSI is the accepted corporate application standard. It has some major corporate benefits compared to legacy deployment techniques. WiX is the new open source way to create MSI files.

Sample Code:

WiX Quick Start: Here are some of the best sample code links that I have found over time for WiX:

Some good starting links to learn Wix:

Extract Files from Setup.exe WiX Bundle or from an MSI file itself:

As I wrote in my suggested "Wix quick start" post above: Wix is hands-on. Just focus on simple, but complete real-world samples like the one from Codeproject - reading the documentation alone is likely to be merely confusing.

Focus on splitting your application into components and set up a major upgrade. Use one file per component as a rule of thumb, and read this answer for a better understanding of component creation: Change my component GUID in wix?

A major upgrade is the most commonly used upgrade mechanism for deployed software (the other common upgrade type is minor upgrade). It is obviously crucial that you can upgrade what you have deployed already. Get upgrade scenarios working before you deploy your first software version so you have confidence in your deployment solution.

Once you got your components set up and your upgrade solution is working, the rest of the pieces fall into place as you work your way through your application's deployment requirements and check for samples on the Wix tutorial site: https://www.firegiant.com/wix/tutorial/.

For those writing Wix code directly (without a GUI editor), I suggest you check this answer for a way to keep your source files terse: Syntax for guids in WIX?

Further read:

查看更多
梦醉为红颜
3楼-- · 2018-12-31 09:23

Im going down this path now, where i have inherited software using MSI/WiX for the installer, but looking at converting our process to continious delivery and pushing out updates that are installed without client interaction. I think its incorrect to pigeon hole nuget as a SDK tool, in its essence it is a tool to deploy versioned sets of files. Furthermore, if the software you are deploying replies heavily on nuget already, and you are already packaging your assemblies into nuget packages for internal use, then why add extra technology into the mix for the sake of it? package up a nuget.exe in your msi, call update on it periodically, done.

I know WiX supports creating patches, but it seems like its an afterthought. Additionally, what happens if your patch fails installation? Installing patches out of order? Your main installer requires UAC permissions, while your patch does not?

i think times are changing, and MSI represents an older way of thinking about things. Chocolatey is a good example, but its still at a this hybrid stage, mixing both technologies.

MSI is more like pull - u get a package, then install it. Nuget is more like a push stratergy - u get the name of a package, install it, then periodically u can call update, and a new version is downloaded and installed.

查看更多
登录 后发表回答