在新csproj的nuget包中添加自定义DLL文件
.nuspec文件有一节,新csproj文件包含本地化资源的备选方案是什么?如何添加自定义DLL文件?技巧的第一部分是将第三方DLL添加到nupkg。这就是:在新csproj的nuget包中添加自定义DLL文件,nuget,nuget-package,csproj,Nuget,Nuget Package,Csproj,.nuspec文件有一节,新csproj文件包含本地化资源的备选方案是什么?如何添加自定义DLL文件?技巧的第一部分是将第三方DLL添加到nupkg。这就是: <ItemGroup> <Reference Include="ThirdParty"> <HintPath>..\DLLs\ThirdParty.dll</HintPath> </Reference> </ItemGroup&g
<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>
..\dll\ThirdParty.dll
真的
lib\$(TargetFramework)
如果将此软件包安装到旧式csproj中,则会添加对ThirdParty.dll
的引用
但是,如果您将此软件包安装到一个新样式的csproj中,那么对ThirdParty.dll
的引用将不会作为引用添加,这令人恼火。正在进行的工作…可能重复的