1

我有一个 nuget 包,其中包含一个需要引用的 dll 和一个只需要包含在程序输出中的 dll。

来自 nuspec 的相关信息:

<references>
    <reference file="dllA.dll" />
</references>
</metadata>
<files>
    <file src="dllA.dll" target="lib" />
    <file src="dllB.dll" target="content" />
</files>

我一直在使用 install.ps1 文件来尝试修改 .csproj 以添加此部分:

<Content Include="<path to dllB.dll">
  <Link>dllB.dll</Link>
  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

我不知道如何获取 dllB 的路径,并且在使用 powershell 安装 nuget 包期间无法修改 .csproj。

4

0 回答 0