Skip to content

Releases: oleg-shilo/wixsharp

Release v1.5.0.0

03 Dec 07:09
Compare
Choose a tag to compare

This release delivers defect fixes and quite a few new features (majority is contributed by @Xaddan).

The most important feature to be aware of is the customization of the ID allocation algorithm. This feature may affect some users so please read about it in more details in the bottom section.


  • Added IniFile element support
  • Add ProgressText element support
  • Add UrlReservation element support
  • Add CustomActionRef element support
  • Add CustomAction rollback customization
  • Issue #201: WixStandardBootstrapperApplication ShowVersion
  • Issue #198: Files.AddRange not work; Extension method AddRange is renamed in Combine
  • Issue #208: Unable to sign msi file
  • Issue #214: Add InstallPrivileges property to project
  • Issue #206: WixQuietExecAction and deferred
  • Custom hash based ID-generation algorithm has been embedded as WixSharp.Project.HashedTargetPathIdAlgorithm
  • Separated Project.CustomIdAlgorithm and Compiler.CustomIdAlgorithm
  • Added Compiler.AutoGeneration.IsWxsGenerationThreadSafe
  • Compiler.AutoGeneration settings object made read-only

ID allocation customization

The need for user defined ID allocation algorithm was expressed in the multiple reports. The existing ID auto-generation algorithm exhibited certain practical limitations in some scenarios. While manual ID allocation gives the user the complete control over ID allocation, having a hybrid solution when user has ability to customize the auto-allocation was an attractive option.

Starting from this release user as an ability to provide a customid-allocation algorithm, which is invoked by WixSharp if no explicit Id for the WixEntity is specified:

project.CustomIdAlgorithm = 
        entity =>
        {
            if (entity is File file)
            {
                var target_path = this.GetTargetPathOf(file);

                var dir_hash = Math.Abs(target_path.PathGetDirName().GetHashCode32());
                var file_name = target_path.PathGetFileName();

                return $"File.{dir_hash}.{file_name}"; // pass to default ID generator
            }
        };

WixSharp also provides an alternative ready to go id-allocation algorithm, which addresses the reported limitations. Thus instead of emitting indexed IDs it produces ID with the target path hash for all File entities/elements. Note this feature does not affect user ability to set IDs manually.

// globally via configuration
Compiler.AutoGeneration.LegacyDefaultIdAlgorithm = false;

// for project only via delegate
project.CustomIdAlgorithm = project.HashedTargetPathIdAlgorithm;

The feature implementation took into account the community feedback provided via #204.

The new approach is more reliable but it will affect the users who stores the generated WXS files under source control. That's why the new API allows switching back to legacy ID-allocation algorithm if required.

Currently (in this release) the new hash-based algorithm is disabled by default to allow the users some time to get used to the new algorithm. But it will be made enabled by default in the next release.

Support for new WiX elements

Sample for UrlReservation element:

var project =
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
        new UrlReservation("http://+:2131/url/device_service/", 
                           "*S-1-1-0", 
                           UrlReservationRights.register),
        ...

Sample for IniFile:

var project =
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new File(@"..\Install Files\Files\Bin\MyApp.exe")),
        new Property("IP_ADRESS", "127.0.0.1"),
        new IniFile("config.ini", "INSTALLDIR", IniFileAction.createLine, "discovery", "enabled", "false"),
        new IniFile("config.ini", "INSTALLDIR", IniFileAction.createLine, "info", "enabled_server", "[IP_ADRESS]"));

Support for CustomActionsRef:

var project = 
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new CustomActionRef ("WixFailWhenDeferred", 
                                 When.Before, 
                                 Step.InstallFinalize, 
                                 "WIXFAILWHENDEFERRED=1")
...
project.IncludeWixExtension(WixExtension.Util);

Sample for Rollback customization:

var project = 
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new ElevatedManagedAction(CustomActions.Install, 
                                      Return.check, 
                                      When.After, 
                                      Step.InstallFiles, 
                                      Condition.NOT_Installed, 
                                      CustomActions.Rollback)
                                      {
                                          RollbackArg = "Prop=Rollback"
                                      }
...
public class CustomActions
{
    [CustomAction]
    public static ActionResult Rollback(Session session)
    {
        MessageBox.Show(session.Property("Prop"), "Rollback");

        return ActionResult.Success;
    }
...

Release v1.4.11.0 (RC)

21 Nov 06:03
Compare
Choose a tag to compare
Pre-release
  • Custom Id-generation algorithm support (sample):
    • Custom hash based ID-generation algorithm has been embedded as WixSharp.Project.HashedTargetPathIdAlgorithm
    • Separated Project.CustomIdAlgorithm and Compiler.CustomIdAlgorithm
    • Added Compiler.AutoGeneration.LegacyDefaultIdAlgorithm flag to control the algorithm selection (incremantal vs. hashed)
  • Added Compiler.AutoGeneration.IsWxsGenerationThreadSafe
  • Compiler.AutoGeneration settings object made read-only
  • Issue #201: WixStandardBootstrapperApplication ShowVersion
  • Issue #198: Files.AddRange not work; Extension method AddRange is renamed in Combine

Release v1.4.10.0

13 Nov 22:31
Compare
Choose a tag to compare
  • Issue #182: RegistrySearch has "Win64=no" when building x64 installers
  • Issue #184: Certificate - SetComponentPermanent(true) does not make component permanent
  • Issue #185: INSTALLDIR with russian symbols
  • Issue #191: Setup crash in feature selection dialog
  • Issue #193: Localization
  • Issue #196: ID Generation is weak
  • Issue #197: How can I get wixpdb?

Release v1.4.9.0

06 Oct 05:33
Compare
Choose a tag to compare
  • Issue #172: Request for IsSilent() extension method
  • Issue #166: How to make a Single Package Authoring
  • XElement extension method AddOrUpdateElement has been renamed in SetElementValue
  • Added AddOrUpdateElement XElement extension method
  • Updated SelectOrCreate XContainer extension method to handle XDocument objects
  • Added support for Bundle downgrade detection and graceful exit from SilentBootstrapperApplication BA
  • Updated sample DeferredActiosn sample with extra ConfigFile manipulation code. To assist with question #165.
  • Issue #160: Question: Registry Key Permissions Handling
  • Implemented changing the title and description of the ManagedUI.ExitDialog depending on the Install error or cancellation.

Release v1.4.8.0

14 Sep 09:41
Compare
Choose a tag to compare

v1.4.8.0

  • Issue #103: Compiler.WixLocation, WixSharp.wix.bin and new csproj format in Visual Studio 2017
  • Implemented showing MSI messages (Error, Warning and User) fro message handler of ManagedUI.
  • Added IManagedUIShell.Errors
  • Implemented changing the title and description of the ManagedUI.ExitDialog depending on the Install error or cancellation. (#156, #154, #150)
  • Added sample on how to change fonts and font color in Wix# native UI
  • Issue #151: UAC prompt appears minimized in TaskBar
  • Issue #141: Default UI header not transparent (completed)
  • Issue #145: Suggestion to add extra pre-defined Condition to be triggered when uninstalling.
  • Issue #141: Default UI header not transparent
  • Issue #137: Add custom attribute to Bundle project (Bootstrapper)
  • Added support for XML namespace prefix in 'AttributesDefinition AttributesDefinition = "{dep}ProviderKey = 01234567-8901-2345-6789-012345678901"`
  • Added support for ActionResult.SkipRemainingActions in UIInitialized event handler.
  • Issue #130: ManagedUI does not visually indicate upgrade failure
  • Added extension methods:
    • Session.LookupInstalledVersion
    • Session.QueryProductVersion
    • Session.QueryProperty
  • SetupEventArgs.ManagedUIShell renamed into SetupEventArgs.ManagedUI and marked as obsolete.
  • Added SetupEventArgs.ManagedUI.Shell to allow UI navigation to be triggered from ManagedSetup events (e.g. e.ManagedUI.Shell.GoTo<ExitDialog>()).
  • e.ManagedUI.Shell.ErrorDetected made writable to allow failing the setup from from ManagedSetup events.
  • Project.UIInitialized is reworked to make UI dialogs available as soon as possible. Useful for hooking to e.ManagedUI.OnCurrentDialogChanged before the UI sequence is started.
  • Added sample for MajorUpgrade scenario with ManagedUI.
  • Issue #128: [ManagedUI] INSTALLDIR with SourceName attribute
  • Issue #125: RegParser needs to handle a string value ending with "\n", not only with "\r\n"
  • Issue #123: Folder not removed on uninstalling
    v1.4.7.2 (beta)
  • Added support for client assembly %this% with non '.dll' extension. This solves the problem with DTF runtime asm probing failing to locate non standard assemblies (e.g. '.compiled').
  • Fixed payload serialization problem for ExePackage
    v1.4.7.1 (beta)
  • Issue #116: DigitalySign with Keystore

Release v1.4.7.2 (Beta)

09 Aug 08:22
Compare
Choose a tag to compare
Pre-release

Release v1.4.7.1-2

v1.4.7.2

  • Added support for client assembly %this% with non '.dll' extension. This solves the problem with DTF runtime asm probing failing to locate non standard assemblies (e.g. '.compiled').
  • Fixed payload serialization problem for ExePackage
    v1.4.7.1
  • Issue #116: DigitalySign with Keystore

Release v1.4.7.0

02 Aug 03:15
Compare
Choose a tag to compare
  • Issue #111: Display attribute & Reset link doesn't work in FeaturesDialog window
  • Issue #107: ManagedBootstrapperApplication Payloads
  • issue #108: [ManagedUI] feature checkbox can be unchecked when allowChange is false
  • Issue #109: [ManagedUI] backgroup image dimensions
  • Issue #103: Compiler.WixLocation, WixSharp.wix.bin and new csproj format in Visual Studio 2017
  • Issue #99: Working with embedded WPF UI and MSI; Updated code sample.
  • Issue #102: Update nuget package WixSharp.bin to include WIX (Windows Installer Xml) Toolset v3.11
  • Migration of WiX Toolset from v3.10.3 (v3.10.3007.0) to v3.11.0 (v3.11.1701.0)

Release v1.4.6.2

01 Jul 00:26
Compare
Choose a tag to compare

Release v1.4.6.2

  • Issue #96: Using WxsFiles and OutDir causes build to fail
  • Added Conditions for .NET Frameworks 4.5.1, 4.5.2, 4.6, 4.6.1 and 4.6.2
  • Fixed problem with AddXmlInclude when custom Project.OutDir is specified. Triggered but not related to the issue #96.

Release v1.4.6.0-1

23 Jun 13:49
Compare
Choose a tag to compare
  • Removed accidental DigitalSignature XML attribute form Bundle.
  • Issue #90: WixEntity.DoNotResetIdGenerator is broken
  • Issue #80: Error in AddRegValue
  • Issue #86: NHibernate.dll in Custom Actions
  • Issue #79: How to set the visible attribute of MsiPackages in a bootstrapper bundle
  • Extended digital signing support (https://github.com/alxcp/wixsharp branch):
    • Signing example is changed to using new signature functionality
    • Add digitally sign params to Project and Bundle
    • Added DigitalySign and DigitalySignBootstrapper classes was added.
    • Using insignia tool for signing the bootstrapper
    • Digitally sign logic now support /d (Description) parameter of SignTool. When UAC ask user about elevation rights, it`s used Description for showing name of MSI. If digitally signature has no Description, UAC shows temp file name instead.
  • Fixed problem with SilentBA staying in memory on update (cutesy of Alexey Che...ev)

Release v1.4.5.0

26 May 13:22
Compare
Choose a tag to compare
  • Additional work for Issue #48: WixSharp.Files generation : same folder on different features
  • Issue #71: Can`t build Wix# Samples\Shortcuts
  • Fixed an error with path to signtool.exe from ClickOnce's SDK
  • Issue #74: How to add file into install subdir?
  • Issue #75: Passing data via SetupEventArgs.Data to AfterInstall handler
  • Fixed typo in UnescapeKeyValue implementation