[wix-users] Creating a NuGet package from a WiX Library

Vanniekerk, Tyrel (GE Healthcare) tyrel.vanniekerk at ge.com
Thu May 21 08:46:51 PDT 2020


Neat, that sounds great.  Normally I just have to get stuff done ASAP, so it's make it work.  I have a nice robust framework going on top of the v3 platform, so hopefully I will be able to massage it to work on v4 when that comes out in 2025.  😉

I got the NuGet package to 'almost' work.  It installs, but does not add the reference to my .wixlib file.  The code bellow uses bits that I assume are part of a regular VS project because the Object.References call returns null.

I did download the source code for the WiX VS extensions, so I will dig through that code and see if that has anything that can help.  VS does allow you to add references to the WiX Setup project, so one would think it should be possible through the EnvDTE API.  If that fails I could see if it's possible to modify the project file XML directly and if that fails I will just have to manually add a reference to the .wixlib.

This is only used internally in our company and mostly only by me, "The Installer Guy".  The issue is that I have been successful in creating working installers without paying InstallShield $75k.  So I get requests to create installers for other products as well, so making my installer framework becomes a thing, otherwise I would need to have all the installers for unrelated products be in the same solution.

Thanks.

$wixSharedRef = $project.Object.References.Item("Dcar.Install.WixShared.wixlib");

if ($wixSharedRef)
{
    $wixSharedRef.Remove();
}

$wixSharedPath = Join-Path $installPath "lib\Dcar.Install.WixShared.wixlib";

$project.Object.References.Add($wixSharedPath);


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Rob Mensching via wix-users
Sent: Wednesday, May 20, 2020 8:45 PM
To: Christopher Painter <chrpai at iswix.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Rob Mensching <rob at firegiant.com>
Subject: EXT: Re: [wix-users] Creating a NuGet package from a WiX Library

In v4, the WiX Toolset MSBuild integration will be available via NuGet (as an SDK-style project) and the wix.exe is a dotnet tool will be available via NuGet (dotnet tool -i).

We're also updating all of the projects to play better with NuGet so you can (for example) use .nupkgs in managed custom action projects and (if all goes well) reference WiX extensions via NuGet.

Basically, v4 is designed in a world where NuGet is the package manager for the Microsoft build system.

---
Short replies here. Complete answers here: https://www.firegiant.com/services/

From: Christopher Painter <chrpai at iswix.com>
Sent: Wednesday, May 20, 2020 5:30 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Rob Mensching <rob at firegiant.com>
Subject: Re: Creating a NuGet package from a WiX Library

I talked to (the) (one of the?) nuget guys years ago.  I didn't see how NuGet did anything for deployment.  To me it's an NPM type package manager that is an easy button for developers to pull dependencies in.   If you happen to use publish profiles / cloud deployment your not even thinking about deployment actually.  If your thinking MSI your thinking  merge modules,  wixlibs, chaining and so on.  I mentioned all of this and I got the impression he thought I didn't know what I was talking about and was ready to get off the phone.

Where do you see WiX v4 and NuGet working together?

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list