如何将 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>
Run Code Online (Sandbox Code Playgroud)
但不工作。
请指导我如何将 nuget 包 dll 添加到 wix 安装程序。
谢谢,纳文
创建一个空的新项目(库)并在这个新项目中安装 nuget-package 。在您的设置中,您收集安装了 nuget-package 的新项目的构建输出。
<Component Id="cmpId1" Guid="BF985D52-BA8C-4E4F-84CC-B5A95520FBD4">
<File Id="fileId1" KeyPath="yes" Source="$(var.NugetCollectorProject.TargetDir)\Unity.Abstractions.dll" />
</Component>
Run Code Online (Sandbox Code Playgroud)
NugetCollectorProject 是新项目。您的安装程序必须引用该项目才能使用该 var.projectname.targetdir