Skip to content

WixSharp and WiX4

Oleg Shilo edited this page Jul 16, 2023 · 9 revisions

This page, to some degree, is "under construction".

If you are to make any contribution to WiX4 codebase please do it in the wix-v4-master branch

Why WiX4?

With the release of WiX v4 on April 5 2023, the need for its integration with WixSharp become a logical step in the evolution of WixSharp as a product.

Though, it must be said that there is no strong technical reason for WixSharp to do anything about WiX v4. Why that?

WiX was the answer to the absurd situation when MSI toolchain was virtually absent and required manual editing of setup database tables (msi file). WiX has solved this problem brilliantly by providing compilers for the setup database specification expressed as XML syntax.
For those who are not aware, every msi file is a database with multiple tables (e.g. Properties, Binary, Directory, Component, Dialog) that is used by MSI runtime to execute a deployment workflow on the target system.

WixSharp is the answer to the situation when you need to think about your setup not in the deployment scenario categories but in setup database tables. WixSharp lets developers define deployment as "I want to deploy these files to this location" and "I want to execute this behaviour at this stage of installation". All this with a single tool (VS/MSBuild) and with a single setup file with the first-class programming language C#. And a cherry on top is the ability to build setup custom UI with a proper UI framework (standard WinForms or WPF) as opposed to MSI/WiX clumsy exotic XML-based markup with zero tooling support (e.g. UI Designer).

Thus WixSharp already allows all this with WiX v3 so why to go with WiX v4?

Well, there are a few good reasons.

  • Some of the nasty WiX defects are finally solved in WiX v4.
  • WiX v4 has an excellent new tool deployment model. All compilers and extensions are pulled in your CI as .NET tools and NuGet packages.
  • MSI/WiX knowledge base will slowly evolve to mainly focus on WiX v4 so when developers are dealing with WiX syntax emitted by WixSharp at compile time.

Wix v4 Migration Roadmap

Migrating is not an easy process as even after the public release WiX v4 as a technology still has some gaps. The first WixSharp for WiX v4 release preview become available on 12 Apr 2023. But the porting was only partial as some of the existing WixSharp features are very challenging to port due to the very current lack of information about some WiX v4 features (e.g. Custom Managed BA).

The porting work will resume after this information becomes available.

The progress of this effort is to be tracked on this page: Migrating to WiX v4.

All Wix v4 currently unresolved issues are described on this page: Unresolved issues with WiX v4.
Please contribute there if you happen to have any useful information useful for solving these problems.

As far as the overall migration plan goes, WixSharp will be following the ".NET Framework"-to-".NET Core" migration model.

Thus after the first full release of WixSharp on WiX v4, it will be available under the name WiXSharp-WiX4. And it will be supported for quite some time in parallel with WixSharp (targeting WiX v3).

After reaching maturity WiXSharp-WiX4 will be distributed under the name of WiXSharp, while Wix v3 edition will become WiXSharp-WiX3.

And at some point WiXSharp-WiX3 will become obsolete and retired in its own GitHub repository.

This approach worked very well for CS-Script (C# script engine), another product from the WixSharp family:

CS-Script migration to .NET Core: