[wix-devs] NuGet support for wixlibs

Tom Glastonbury tomg at zanyants.com
Tue Mar 8 10:10:35 PST 2016


@Heath:

My approach likewise works without powershell scripting support. And the
wixlib is stashed in tools\payload, so compliant with the NuGet team
request you mentioned re the 'lib' directory. My early tests worked fine
with adding the WixLibrary item at evaluate time (including I think within
a trivial WiX setup project in Visual Studio, although I do often develop
build process stuff using msbuild from the command line, so maybe I'm
mistaken). However, during further integration into our in-house projects I
did then bump into Visual Studio's delightfully undebuggable "Cannot modify
an evaluated object originating in an imported file" error when loading the
project. I've since updated the .targets file emitted into the generated
nuget package to add the item within a target. I've not yet had a chance to
look at your strategy in Wix4, I hope to do so soon.

I've also fixed a couple of other issues: one to do with an interaction
with $(OutDir) initialization timing, another to do with a logged NuGet bug
where nuget pack silently refuses to pack any file anywhere into the
package which happens to have a .nuspec extension.

These fixes are included in v0.1.2 (see [1])

And I've removed use and support for the $(SomeTargetDependsOn) pattern as
this seems to be discouraged from .NET/MSBuild 4.0 onwards (see [2])

[1]
http://www.nuget.org/packages/WixNuGetPackager/0.1.2

[2]
http://blogs.msdn.com/b/msbuild/archive/2010/02/18/build-extensibility-with-net-framework-4.aspx




On 8 March 2016 at 17:40, Heath Stewart <Heath.Stewart at microsoft.com> wrote:

> Have you tried opening a .wixproj in VS? Once a .props/.targets file is
> imported and directly adds to an <ItemGroup>, the project no longer loads.
> That's what I was doing internally until we actually opened in VS, which is
> when we needed to start adding a target to add them during build.
>
> Heath Stewart
> Visual Studio, Microsoft
> http://blogs.msdn.com/heaths
>
> -----Original Message-----
> From: wix-devs [mailto:wix-devs-bounces at lists.wixtoolset.org] On Behalf
> Of John Cooper
> Sent: Monday, March 7, 2016 4:05 PM
> To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
> Subject: Re: [wix-devs] NuGet support for wixlibs
>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fborgsdemons.com%2fblog%2f2014%2f09%2f30%2fwalk-through-of-creating-a-wix-wixlib-nuget-package%2f&data=01%7c01%7cHeath.Stewart%40microsoft.com%7c4c74f7cd79c6491c948a08d346e54aa4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=dkFfQzGqMQgdCKbIlGmiT1AEdffH5bH1uhOKV%2fT0tDg%3d
>
> I use a props file with the Wixlib Reference which is then imported.
>
> I've got some improvements that make the upgrade process less painful on
> VS 2015.  I'll be posting them when I get some cycles.
>
> --
> John Merryweather Cooper
> Senior Software Engineer | Integration Development Group | Enterprise
> Notification Service Jack Henry & Associates, Inc.® | Lenexa, KS  66214 |
> Ext:  431050 |JoCooper at jackhenry.com
>
>
>
>
> -----Original Message-----
> From: wix-devs [mailto:wix-devs-bounces at lists.wixtoolset.org] On Behalf
> Of Tom Glastonbury
> Sent: Monday, March 7, 2016 3:32 AM
> To: wix-devs at lists.wixtoolset.org
> Subject: [wix-devs] NuGet support for wixlibs
>
> The e-mail below is from an external source.  Please do not open
> attachments or click links from an unknown or suspicious origin.
>
> This is about using NuGet packages to distribute wixlibs, and follows on
> from:
>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwindows-installer-xml-wix-toolset.687559.n2.nabble.com%2fNuGet-support-for-wixlibs-extensions-td7598683.html&data=01%7c01%7cHeath.Stewart%40microsoft.com%7c4c74f7cd79c6491c948a08d346e54aa4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ntOouL8pgjh0fTKBZLkgI39G%2fPRnBYFfGmwxATl3was%3d
>
> I'm not sure if WiX has grown built-in support for this since that thread
> was posted, but I failed to find anything despite vigorous Googling. We
> needed this functionality in-house at my workplace, so I created a NuGet
> package that, when added to a WiX Library project, extends the build
> process to produce a NuGet package that can be added to a WiX project,
> adding a reference to the wixlib. In case it might be useful for others,
> I've put the project on github and published the generator package to
> nuget.org. The project is called WixNuGetPackager.
>
> https://github.com/zanyants/WixNuGetPackager
>
> https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.nuget.org%2fpackages%2fWixNuGetPackager&data=01%7c01%7cHeath.Stewart%40microsoft.com%7c4c74f7cd79c6491c948a08d346e54aa4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=7k2U9Hjixo%2ftvtW5ridXW%2ba7vpMBgP%2bOUXCY6PDXOTw%3d
>
> See the github project homepage for details of use, and notably a
> disclaimer regarding limited test scenarios.
>
> Thanks,
>
> Tom
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=01%7c01%7cHeath.Stewart%40microsoft.com%7c4c74f7cd79c6491c948a08d346e54aa4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=3C%2fXXZkK7kg5EE2t0J0MVteFE2aHoJWS1Hl74mVigEY%3d
>
> NOTICE: This electronic mail message and any files transmitted with it are
> intended exclusively for the individual or entity to which it is addressed.
> The message, together with any attachment, may contain confidential and/or
> privileged information.
> Any unauthorized review, use, printing, saving, copying, disclosure or
> distribution is strictly prohibited. If you have received this message in
> error, please immediately advise the sender by reply email and delete all
> copies.
>
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=01%7c01%7cHeath.Stewart%40microsoft.com%7c4c74f7cd79c6491c948a08d346e54aa4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=3C%2fXXZkK7kg5EE2t0J0MVteFE2aHoJWS1Hl74mVigEY%3d
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-devs mailing list