[wix-users] EXT: Re: .NET Standard
Christopher Painter
chrpai at iswix.com
Fri May 29 20:45:01 PDT 2020
I build 99% of my custom actions against .NET 2.0 and then set the customaction.config to run against CLR 2 and 4. I like to create a custom action (sync ignore exit code) called ValidateDotNet that sets a private property to 1 if it ran and schedule it before AppSearch then create a LaunchCondition that says a working installation of .NET 2.0 or newer is required. This has worked really well for me for the past 10 years or so.
MSI installs applications on Win32 platforms. I don't see why anyone would need .NET Core in their installer stack. .NET Standard is a good way to make sure code can be reused in your application and your installer (like if you have a .NET Core application and have a method that validates a license key).
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Vanniekerk, Tyrel (GE Healthcare) via wix-users
Sent: Friday, May 29, 2020 8:43 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Vanniekerk, Tyrel (GE Healthcare) <tyrel.vanniekerk at ge.com>
Subject: Re: [wix-users] EXT: Re: .NET Standard
That's great news about version 4. I figured I would mess around with it a bit myself to see where it is at.
The problems I run into is that our company and customers are slow to move forward. We still support Windows 7 on some products because they are afraid to drop support for it because customers still use it. Even though MS no longer supports it (other than expensive extended support contracts).
The idea of .NET core is nice. You run it and hey presto, it works. You don't have to pre-install stuff just for your app to run. As for .NET, most modern OS'es come with a newer version of .NET installed and if you run Update, it typically will update to 4.8 automatically. However, again, most companies are more conservative and only install critical updates, lagging far behind with patching their machines. Ugh. 😊
My understanding is that the .NET standard projects are effectively a build platform. Making it easy to support multiple targets etc. I know if you create a .NET standard app, it will pull in many NuGet packages with the .NET modules instead of getting it from the GAC. That's what I am hoping for. I don't need the app to run on a phone or Linux or a Mac, I just want to trade some disk space for something that will run regardless of if .NET is installed on the OS or not.
Also, I suppose it has the benefit that you only include the parts of .NET that you need and when you test, you are testing with a know codebase, not with whatever version of .NET the customer happens to have installed.
Anyways, thanks for the answer.
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Sean Hall via wix-users
Sent: Friday, May 29, 2020 5:02 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Sean Hall <r.sean.hall at gmail.com>
Subject: EXT: Re: [wix-users] .NET Standard
I don't think there's anything preventing you from writing your BA or Custom Action in .NET Standard 2.0 or earlier. BootstrapperCore.dll and all of DTF is compiled for .NET Framework 3.5 and should be usable anywhere .NET Standard 2.0 or earlier is supported.
Of course, that's not what you're really asking for - you want your BA or Custom Action to run on .NET Core instead of .NET Framework. Since both Windows Installer (msiexec.exe) and bundles (burn.exe) are written in native code, the BA or the CustomAction is the one that needs to start the .NET Core runtime. This is the hard part, and significantly more complicated than starting the .NET Framework runtime. In fact, .NET Core barely supports how WiX wants to host the runtime - https://github.com/dotnet/runtime/issues/35465. If your expectation was that you could just package up the .NET Core runtime with your Custom Action to avoid relying on it being installed, be aware that on .NET Core
3.1 (currently the latest version) that would be at least 30MB.
I think it's fair to say that no one on the WiX core team is going to spend their free time getting Custom Actions running on .NET Core. These days, you can rely on .NET Framework 4.x being available on the machine and best practice custom actions shouldn't be interesting enough to need any new functionality from .NET Core.
WiX v4 has a .NET Core BA, with the requirement that you target .NET Core 3.x or later.
On Fri, May 29, 2020 at 12:11 AM Vanniekerk, Tyrel (GE Healthcare) via wix-users <wix-users at lists.wixtoolset.org> wrote:
> Hi,
>
> This is just a general question to the WiX Toolset developers. I am
> curious if there are any reasons why the ApplicationBootstrapper and
> CustomActions classes and assemblies could not be written to support
> .NET Standard 2.*?
>
> I have a launcher application that our users use to kick off the
> various installers etc., and it's just a .NET WPF app, so it does not
> have the handy dandy C++ bootstrapper to install .NET Framework if
> needed. If I understand correctly, the .NET standard/core uses a
> NuGet packages version of the .NET Framework, so that app should be
> able to run on a system without .NET Framework installed. At least that's what I expect.
>
> If the bootstrapper UI was also in standard, it would mean that it
> could run without needing to install the framework, which would be cool.
>
> Thanks,
> Tyrel
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list