【发布时间】:2017-04-09 10:47:08
【问题描述】:
.nuspec 文件有
【问题讨论】:
标签: nuget nuget-package csproj
.nuspec 文件有
【问题讨论】:
标签: nuget nuget-package csproj
诀窍的第一部分是将您的第三方 DLL 添加到 nupkg。这样做:
<ItemGroup>
<Reference Include="ThirdParty">
<HintPath>..\DLLs\ThirdParty.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="$(OutputPath)\ThirdParty.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)</PackagePath>
</Content>
</ItemGroup>
如果您将此软件包安装到旧式 csproj 中,则会添加对 ThirdParty.dll 的引用。
但是,如果您将此软件包安装到新样式的 csproj 中,那么对ThirdParty.dll 的引用将不会被添加为引用,这很烦人。正在进行中...
【讨论】: