I'm trying to create NuGet package which provides native DLLs and the MSBuild target to copy such DLLs into output directory of a .csproj project which would use the packet. I also need DLLs from NuGet package to be copied into output folders of other referencing projects and projects which are dependent upon such referencing projects. I use this advice to achieve that, and there are some problems:
- it works fine for the project (projA) which use NuGet package (afte building it, I see expected native DLLs in output directory).
- it works for another referencing project only if I add for the projA some fake file as a 'content' (i.e. file is not to be compiled, but it is to be published with a project).
- it doesn't work at all for projects, dependent from the referencing projects (i.e., using the work around from p.2, I managed to copy native DLLs into output directory of the referencing project, which refers to the projA, but I need the same for the project which depends on the referencing project).
How to achieve this? Now, as I fail to do it, I'm forced to use ugly .cmd script to copy native DLLs into output folders of projects which require it.