user3839566
user3839566

Reputation: 73

How to Add Nuget package dlls to Wix installer

How to Add Nuget package dlls to Wix installer. I tried with adding

<?define SourceDirectory = $(var.SolutionDir)\ProjectName\bin\Release" ?>

   <Component Id="cmpId1"  Guid="BF985D52-BA8C-4E4F-84CC-B5A95520FBD4">
      <File Id="fileId1" KeyPath="yes" Source="$(var.SourceDirectory)\Unity.Abstractions.dll" />
   </Component>

But not working.

Please guide me how to add nuget package dll to wix installer.

Thanks, Naveen

Upvotes: 6

Views: 5367

Answers (1)

D.J.
D.J.

Reputation: 4034

make a new project (library) that is empty and install the nuget-package in this new project. in your setup you collect the buildoutput of that new project that has the nuget-package installed.

<Component Id="cmpId1"  Guid="BF985D52-BA8C-4E4F-84CC-B5A95520FBD4">
      <File Id="fileId1" KeyPath="yes" Source="$(var.NugetCollectorProject.TargetDir)\Unity.Abstractions.dll" />
   </Component>

NugetCollectorProject is the new project. Your Setup must have a reference to that project to use that var.projectname.targetdir

Upvotes: 6

Related Questions