9

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 ?

1 Answer 1

3

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/

Sign up to request clarification or add additional context in comments.

2 Comments

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.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.