Net4x.InstallerTool 1.8.1.26250

dotnet add package Net4x.InstallerTool --version 1.8.1.26250
                    
NuGet\Install-Package Net4x.InstallerTool -Version 1.8.1.26250
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Net4x.InstallerTool" Version="1.8.1.26250" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Net4x.InstallerTool" Version="1.8.1.26250" />
                    
Directory.Packages.props
<PackageReference Include="Net4x.InstallerTool" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Net4x.InstallerTool --version 1.8.1.26250
                    
#r "nuget: Net4x.InstallerTool, 1.8.1.26250"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Net4x.InstallerTool@1.8.1.26250
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Net4x.InstallerTool&version=1.8.1.26250
                    
Install as a Cake Addin
#tool nuget:?package=Net4x.InstallerTool&version=1.8.1.26250
                    
Install as a Cake Tool

Net4x.InstallerTool

Adds a WiX Toolset v3 installer to a Visual Studio solution — as a build step, or from the command line.

Reference the package from a project and every build of it will make sure a setup project for that project exists in the solution: a *_Setup folder holding a .wixproj and the .wxs / .wxi / .rtf files WiX needs, referenced by the .sln with its dependency and build configurations already wired up. The setup project harvests the build output with HeatDirectory, so nothing has to list the installed files by hand.

It is the command line face of Net4x.InstallerLibrary; use that package instead to drive the generation from your own code.

Installing

dotnet add package Net4x.InstallerTool

The package brings an MSBuild target that runs the tool after every build of the referencing project, unless the project already carries <GeneratedInstaller>true</GeneratedInstaller> — which is the property the tool itself writes into a project once it has generated an installer for it. The solution, configuration, target framework and platform of the build are passed through.

Building the generated project needs the WiX Toolset v3.11 (or newer) installed; generating it does not.

Running it by hand

InstallerTool.exe /SolutionName="D:\src\MyApp\MyApp.sln" /Configuration=Release /TargetFramework=net48 /Platform=x64
Argument Meaning
/SolutionName The solution to add installers to. Required.
/Configuration The build configuration whose output is installed. Defaults to Release.
/Platform The platform written into the solution and the WiX package. Defaults to x86.
/TargetFramework The target framework whose output is installed, for multi-targeted projects.
/ProjectsToCreateInstall The projects to create installers for. Asked for interactively when missing.
/DirectoriesToExclude Directory names to leave out of the harvested tree, separated by ;.
/ResourcesDirectory Where the templates are read from. Defaults to Resources beside the tool.
/WinUIExtension Path of WixUIExtension.dll. Defaults to the WiX Toolset v3.11 installation.

Choosing the projects

When no project is named, the tool asks: it lists the projects of the solution, lets you pick the ones that should get an installer and the directories to leave out of the installed tree, and remembers the answer in a .json file beside the solution, named after it — MyApp.sln is paired with MyApp.json:

{ "appSettings": { "ProjectsToCreateInstall": "MyApp.csproj" } }

That file is read on every later run, so the question is asked once. Write it yourself to keep builds non-interactive. Several projects are separated by the argument separator (| by default), and a project may name the target framework it should be built for after a comma: "MyApp.csproj,net48|MyService.csproj".

What is generated

For a project MyApp.csproj the tool writes, beside the solution, a directory named after the project and the target framework — MyApp.net48_Setup — containing:

File Purpose
MyApp.net48_Setup.wixproj The WiX project. Harvests the build output into INSTALLDIR and references MyApp.csproj.
Product.wxs The product, its feature and its install directory.
Defines.wxi Product name, manufacturer, version and upgrade code. The upgrade code is derived from the product name, so it stays the same across runs.
Shortcuts.wxi The start menu shortcut to the built executable.
License.rtf The licence shown by the installer UI.

The name, manufacturer, version and description come from the installed project's assembly attributes. Product.wxs, the .wixproj and License.rtf are written only if they are not already there, so edits to them survive a regeneration; Defines.wxi and Shortcuts.wxi are rewritten from the project every time.

The solution itself is rewritten only when the tool actually has something to add to it.


Copyright: Copyright (c) Piero Viano. All rights reserved. Authors: Piero Viano Company: Piero Viano

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.1.26250 93 9/7/2026
1.8.1 723 4/2/2025
1.8.0 285 3/31/2025
1.7.0 1,582 8/27/2023
1.7.0-at20230506055623 1,566 5/7/2023