Closed Zerpico closed 3 months ago
It's not an easy one.
The reason for not including the target version in the package spec is that ideally, WixSharp should be of the lowest runtime version supported by WiX. That's why the expected dev scenario is that the nuget package can be added to any VS .NET project. Thus the future .NET runtimes will be supported without the need to rebuild and republish WixSharp packages.
As for the actual runtime of the released WixSharp assemblies, it is v4.7.1, It is the lowest runtime version supported by Caliburn.Micro (the MVVM of the WixSharp WPF dialogs). The default WiX project templates for custom actions are also set relatively high. I think v4.6.2.
And of course, there is a logical threshold below which one does not want to go. IE it does not make sense to compile everything for .NET 2.0. Thus I decided to use v4.7.1.
Now, about your problem. If you want to use WixSharp for earlier .NET runtimes then you may use WiX3 stream. The release comes with the v4.5.1 binaries: https://github.com/oleg-shilo/wixsharp/releases/download/v1.25.3.0/WixSharp.1.25.3.0.7z
You just need to directly reference the assemblies instead of nuget packages in your project. And just to assist you I have compiled the WixSharp_wix4 binaries manually for you to test (attached).
Saying that, if indeed there is a demand for the WiX4 stream to support older runtimes I may consider releasing an additional version of WixSharp. Even if it means giving up on Caliburn.Micro
. So I suggest you create a discussion topic (or a feature request) and ask people to vote. If it gets some support I will commence the work.
WixSharp_wix4.NET451.zip
I use custom actions in the installer and distribute installers to Win7 SP1 and WinServer 2008 R2 systems, which only have Net 4.5.1 preinstalled.
Now for WixSharp_wix4 the supported version is not indicated in the package information at all, but in fact there is an assembly under net471 inside
Could you build the WixSharp_wix4 nuget package for net451 version? Or make a multi-target for several versions of NET assemblies?
For example, as the Newtonsoft.Json package which contains assemblies for .NET Standard 1.0-2.0, .NET Framework 2.0-4.5 and NET Core 6