Is it possible for dotnet publish
to copy contentFiles
to output from a transitive package dependencies?
In this scenario, I have three projects:
- Content, which has a
nuspec
containing:
<contentFiles>
<files include="any/any/someContent.txt" buildAction="None" copyToOutput="true" flatten="false"/>
</contentFiles>
- Lib, which has a
PackageReference
to Content nuget - ConsoleApp, which has a
PackageReference
to Lib nuget
The Lib project shows the contentFiles in the project explorer and copies to output on build, but the ConsoleApp project does neither.
I need dotnet publish ConsoleApp.csproj
to include someContent.txt
from the Content nuget in the publish output.
Somewhat related posts for context: