[wix-devs] Supporting DTF on .NET Core

Heath Stewart heaths at outlook.com
Sat Jan 7 15:15:16 PST 2017


Let me preface this by saying I’m only looking to start any conversations but not shifting focus from the needed changes to the WixVSExtension for Dev15 (and will take some of Bob’s previous comments on the WIP into account / add them to the WIP). But it looks like PowerShell 6 will run only on .NET Core which means anything running inside it must support .NET Standard (if you’re not familiar with .NET Standard or haven’t been able to keep up with the many, many changes to .NET the past couple years, think PCL, but only in reverse – a contract that all frameworks that support that identifier must support declared APIs.

Anyway, DTF targets .NET 2.0 and for good reason. I don’t want to change that, but instead multi-target for .NET 2.0 and .NET Standard (1.6 ~= .NET 4.6.3 and is more compatible with the .NET Framework (desktop)). As just a proof of concept (and to figure out what conversations here and internally I might need to start), I’ve already updated the Compression project to support it. I’ll push it to my fork for safe keeping, but it would present a few options.


  1.  If there’s good reason to support .NET Core apps in WiX (especially since SWiX could conceivably generate platform-agnostic containers one day), changes could be made to the build system. For example, the recent Preview 4 .NET Core SDK now uses MSBuild Core which doesn’t support [MSBuild]::GetRegistryValueFromView, so all that – which is critical – has to go or be conditioned. This would be a big change for WiX.
  2.  Split DTF out into a separate project. Rob, I know you said you wouldn’t until there’s a good reason – but maybe this is it. A separate build system (would still support strong name and Authenticode signing, NuGet packaging – especially so WiX could continue to use it – etc.) could be more easily created without disrupting all the other code.
  3.  What prompted me down this avenue was finding out my MSI cmdlets (and likely a whole bunch of other ones that wouldn’t work on Core) don’t work in PowerShell 6 (preview). I believe the MS-RL does allow me to copy, modify, and distribute – with full license and header copyrights – the parts of the source I need. I initially used DTF because, while P/Invoking what I need is straight-forward, seemed I spent more time doing that than writing the relatively simple code ot use it. However, I like #2 because – at least so far as admins and devs still care about MSI – it allows DTF to be used in more environments without taking anything away form its current users.

I’m curious on others thoughts on making DTF support Core. I have shot off an email to the PowerShell team about their v6 plans to see if it will be Core-only, but whether to make DTF work on Core (if there’s enough interested to justify it) doesn’t really hinge on their answer.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



More information about the wix-devs mailing list