0

I am trying to add a Nuget package as a reference to a Wix project. I have found how to do exactly what I want to do here:

How to Add Nuget package dlls to Wix installer

But in this case the project file sounds like it is .net framework (not core) project and the having tried this, it downloads all the files to the bin directory of the Nuget Container Project that can be referenced from the wix file as shown in the link i.e.

Source="$(var.NugetCollectorProject.TargetDir)\Unity.Abstractions.dll

I there an way to do achieve this using a .net 5/6 project file so the packages are downloaded to the bin directory of this Project?

Or is there a better waht to do this in Wix v3.X

Thanks, Nick

Nick Tucker
  • 323
  • 7
  • 14
  • 1
    Does this answer your question? [How to bundle dependency .dll files with main product in WiX](https://stackoverflow.com/questions/54202924/how-to-bundle-dependency-dll-files-with-main-product-in-wix) – JuanR Mar 24 '23 at 20:25
  • Are you using WiX4? – Hank Mar 24 '23 at 21:51
  • @Hank - Wix4 is still only in release candidate stage and has been for some time, have you had experience of using it? – Nick Tucker Mar 24 '23 at 23:52
  • 1
    Yes, it's basically production ready. I've been using it for half a year now. And there is a built in tool to convert your wix3 files to wix4 compatible. – Hank Mar 25 '23 at 14:38

1 Answers1

3

WiX v4 supports PackageReference style NuGet references. WiX v3 supports the packages.confg style of NuGet references (mostly). You need to design your use of NuGet appropriately based on which style is being used.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130