How to Add Nuget package dlls to Wix installer

2019-07-11 02:18发布

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

标签: c# .net wix
1条回答
爷、活的狠高调
2楼-- · 2019-07-11 02:59

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

查看更多
登录 后发表回答