Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet tool should not be relied on for wixsharp. #1585

Closed
oleg-shilo opened this issue Jul 11, 2024 · 1 comment
Closed

Dotnet tool should not be relied on for wixsharp. #1585

oleg-shilo opened this issue Jul 11, 2024 · 1 comment

Comments

@oleg-shilo
Copy link
Owner

Triggered by discussion: #1582

Basically, dotnet should not be relied upon for this toolset. It is un-necessary and a poor design decision.
There is no guarantee that dotnet will be present on a particular system, especially while targeting older frameworks.
Possibly in future there may be redirections/additional restrictions in place on the usage (of that executable), the name may change, making using the library more difficult/error prone, etc.

oleg-shilo added a commit that referenced this issue Jul 12, 2024
- #1585:  Dotnet tool should not be relied on for wixsharp.
  Added error logging on `dotnet` or `wix` not found.
@oleg-shilo
Copy link
Owner Author

WixSharp by design relies on WiX toolchain. Thus WiX Toolset needs to be deployed on the build system.
WiX Toolset in turn relies on .NET SDK as a default distribution mechanism for WiX tools. Thus you need to install .NET SDK v8.0 or higher.

WixSharp has no runtime dependency on .NET SDK and it can fully function without it. However, it may still try to use dotnet.exe (part of SDK) to automatically install WiX tools if they are not present.

If for whatever reason you want to build msi on a system that does not have .NET SDK installed you need to bring all WiX tools by any other means. You will also need to disable WixSharp auto-installation of WiX Tools. You can do that starting from v2.3.0 by setting the location of all WiX tools manually:

WixTools.SignTool = @"<path>\signtool.exe";
WixTools.MakeSfxCA = @"<path>\WixToolset.Dtf.MakeSfxCA.exe";
WixTools.Heat = @"<path>\heat.exe";
WixTools.DtfWindowsInstaller = @"<path>\WixToolset.Dtf.WindowsInstaller.dll";
WixTools.WixToolsetMbaCore = @"<path>\WixToolset.Mba.Core.dll";
WixTools.SfxCAx64 = @"<path>\x64\SfxCA.dll";
WixTools.SfxCAx86 = @"<path>\x86\SfxCA.dll";

oleg-shilo added a commit that referenced this issue Jul 13, 2024
- #1580 Shortcut "Target" produces unexpected results for many supported WiX environment constants
- #1574: Cannot build .net 8 example project (NET-Core)
- #1546: dotnet tool install --global wix - Need for all users
- #1585:  Dotnet tool should not be relied on for wixsharp.   Added error logging on `dotnet` or `wix` not found.
- Added error log for failure to find WiX extension. Triggered by #1574, #1589
- Improved the documentation for `AutoElements` and `Compiler.AutoGeneration` (triggered by #1578)
- #7591: added WiX5 Custom BA sample (`<wixsharp>\Source\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WiX5-Spike\WixToolset.WixBA`)
- added missing SilentBA for `WixSharp.Core`
- fixed problem with `SetShellSize` not setting the top level window size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant