简体   繁体   中英

Convert Setup project to Wix

I have an application C#. This application use a Project "Visual Studio Installer/Setup Project" for the setup. I have to change it for a "Windows Installer XML/Setup Project".

The VS Installer use

  • a Custom Action
  • a class public partial class InstallerDB : System.Configuration.Install.Installer . Used to install the database
  • Maybe something else (I don't really understand how this installer Works"

I created a WiX project. In the product.wxs I added a call to the custom action. But how can I call the project with the class InstallerDB ?

And how can I be sure to do exactly the same setup ?

WiX doesn't support installer class custom actions for many reasons, primarily because the Windows Installer team didn't support them and they arrived only in Visual Studio setup projects that Microsoft attempted to get rid of.

WiX has its own support for managed code custom actions derived from the DTF effort to make them more acceptable for Windows Installer, so convert your custom action to this format. Examples are:

https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/

http://www.codeproject.com/Articles/132918/Creating-Custom-Action-for-WIX-Written-in-Managed

If you install services with custom action installer classes then don't bother - WiX supports the built-in Windows Installer features to do this (which Visual Studio setups never did). See the WiX ServiceInstall element, and ServiceControl for stopping and starting. The fact that Visual Studio setups use installer classes can give people the impression that they are required for installation of .NET services, but that's not the case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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