Skip to content

Releases: oleg-shilo/wixsharp

Release v1.6.3.0-HotFix

18 Feb 10:54
Compare
Choose a tag to compare
Pre-release
  • Issue #301: Managed UI: UAC prompt is always in background
  • Implemented DirPermissions inheriting parent Dir features if it has no own features specified.
  • Issue #279: Empty directory belonging to a feature causes an error
  • Added FeatureSet class to allow passing set of features as a constructor Feature parameter
  • NuGet: nbsbuilder has been moved into 'tools' folder to avoid being referenced as an assembly.

Release v1.6.2.0

15 Feb 18:36
Compare
Choose a tag to compare
  • All samples updated to comply with the latest ID allocation algorithm
  • Implemented proper Bootstrapper Variables
  • Renamed Bundle.StringVariablesDefinition -> Bundle.Variables
  • NativeBootstrapper source code has been placed under source control now.
  • Issue #295: In x64 projects, only add Win64=yes to components that haven't already explicitly specified this attribute. Fixes #295
  • Issue #294: Bootstrapper.PreserveDbgFiles not work.
  • Issue #290: Error LGHT0094 : Unresolved reference to symbol 'File:Registrator.exe'
  • Issue #282: Built-in installer placeholders are displayed as format strings with [N] brackets
  • Issue #280: A Shortcut's generated ID is different from what it is explicitly set to
  • Issue #276: HashedTargetPathIdAlgorithm emits duplicated IDs for Cyrillic file names
  • Issue #265: Exception using RegFile class with REGEDIT4 version reg file
  • Issue #267: Set ARPINSTALLLOCATION custom action in wrong place
  • Issue #264: Project.SetVersionFrom() and Project.Version
  • Issue #268: Files starting with a number cause error - Every identifier must begin with either a letter or an underscore.
  • Condition class: add logical operators &, |, NOT
  • Condition class: added Net47_Installed condition
  • Project.HashedTargetPathIdAlgorithm is enabled now by default. Triggered by #204.

Release v1.6.1.0-HotFix

16 Jan 10:33
Compare
Choose a tag to compare
Pre-release
  • Added logical operators &, |, NOT for Condition
  • Added Net47_Installed condition
  • Project.HashedTargetPathIdAlgorithm is enabled now by default. Triggered by #204.

Release v1.6.0.0

12 Jan 04:36
Compare
Choose a tag to compare
  • Migration of WixSharp types to IGenericEntity model:

    • Rework Certificate using IGenericEntity
    • Rework SqlDatabase, SqlString and SqlScript using IGenericEntity
    • Rework DriverInstaller using IGenericEntity
    • Rework FirewallException using IGenericEntity
    • Rework EnvironmentVariable using IGenericEntity
    • Rework FirewallException using IGenericEntity
    • Rework User using IGenericEntity
    • Rework IniFile using IGenericEntity
  • Added support for new WiX types:

    • CloseAppplication
    • RemoveRegistryKey
  • Defect fixes:

    • Issue #258: WixSharp doesn't remove temporary files if custom output name is specified
    • Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper
    • Issue #247: Handling null TimeUrl
    • Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper through to DigitallySign
    • Issue #233: FileSearch
    • Issue #230: CustomAction Condition extension
    • Issue #226: Project.HashedTargetPathIdAlgorithm generates invalid ids
  • Various improvements and minor fixes:

    • Fixed the problem with EnvironmentVariable not having XML parent when it is hosted by the component-less WiX (e.g. ConsumingMergeModule sample).
    • CustomAction.UsesProperties & .RollbackArgs space trimming
    • Trim all spaces around properties (name and value) before passing to msi
    • CommonTasks.InstallService fix & new overload
    • Fixed installService args location, added overload that accepts username and password
    • Added WixObject.MapComponentToFeatures to assist with implementation of IGenericEntity based WiX objects.
    • fix "CustomActionRef.When" property handling in compile.
    • change to use just WixSharp.When.ToString()
    • fix CustomActionRef will add "Before" attribute in Custom Element even if set When.After
    • Added extension methods for
      • Project.Add(IGenericEntity[])
      • File.Add(IGenericEntity[])
      • Dir.Add(IGenericEntity[])
  • AppVeyor integration (https://ci.appveyor.com/project/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