.nuspec file has section <files>, what are the alternatives for include localization resources for new csproj file? How to add custom DLL files?
Asked
Active
Viewed 1,268 times
4
-
Possible duplicate of [MSBuild multiple dll in a single NuGet package](https://stackoverflow.com/questions/44976879/msbuild-multiple-dll-in-a-single-nuget-package) – AuthorProxy Oct 11 '17 at 09:36
1 Answers
1
The first part of the trick is to get your third party DLL added to the nupkg. This does it:
<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>
If you install this package into an old-style csproj then a reference to ThirdParty.dll
will be added.
However, if you install this package into a new-style csproj then a reference to ThirdParty.dll
will not be added as a referece, irritatingly. Work in progress...

Richard Barraclough
- 2,625
- 3
- 36
- 54