如何将Nuget包中的dll文件添加到Wix安装程序

6
如何将Nuget包dll添加到Wix安装程序。 我试着添加:

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

但是没有起作用。

请指导我如何将nuget软件包dll添加到wix安装程序中。

谢谢, Naveen

1个回答

6

创建一个新的项目(库),使其为空,并在此新项目中安装NuGet包。在设置中,收集已安装NuGet包的新项目的构建输出。

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

NugetCollectorProject是新项目。要使用var.projectname.targetdir,您的设置必须引用该项目。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接