I have a NuGet package in which is an extra file packaged as a Content in contentFiles
folder.
Then I have two C# projects with SDK-style .csproj - A and B where Project B references Project A as a ProjectReference
and there is a classic PackageReference
of a NuGet package in the Project A like this:
NuGet package ← Project A ← Project B
My problem is that the extra file gets correctly copied to the build output of Project A, but it won't get copied to the output of Project B unless I do it manually.
Is there a way how to force copy the extra file from the NuGet dependency transitively to the Project B build output?
The only way I can think of is custom Post-build event with xcopy
command but it's more of a workaround than a real solution.
Thanks for any advice in advance!