7

How to author nuget packages required for a .net application in a Wix Setup? At present, we have 100 projects, each using different sets of nuget packages. And, we are manually adding a component for each assembly required for the application. This is very cumbersome, because each time we update a nuget package, we must update the .wxs file too.

Is there a standard way to automate this process of including nuget packages in wix setup? Or is there a workaround ?

jero2rome
  • 1,460
  • 1
  • 19
  • 36

1 Answers1

2

There's a way to do this, you can call the wix harvester (heat) on your project's target directory and it will include everything in there. That command can also take an XSLT filter which ignores certain files if needed. You can call this command as a pre-build event in your setup project, or as a post-build in your actual project.

Here is a guide that shows the details: http://ahordijk.wordpress.com/2013/03/26/automatically-add-references-and-content-to-the-wix-installer/

user145400
  • 986
  • 1
  • 9
  • 25
  • I know this way. I was wondering if there is any other way to do this. Because, again even if you use xslt filter, you have to specify the name of assembly to filter out, which can change by time. – jero2rome Oct 17 '14 at 07:22
  • Basically you want to automatically include the nuget packages for your project into the installer. As far as I know, there is nothing specific in wix that can do that, and the heat harvester is your best bet. I'm guessing if they ever implemented something for nuget it would be part of heat anyway. – user145400 Oct 17 '14 at 15:17