添加到项目中时保留文件夹层级
Include="..\bin\VideoPlayer** ==> /dire/**/* 这样就能在target dire 保留子层级目录了.
将这个内容添加到指定的目录中,而不是根目录
增加link属性, 参考
Include="abc/**/*" Link="target_special_dire/%(RecursiveDir)%(Filename)%(Extension)"
更多用法请参考官方文档:
https://docs.microsoft.com/zh-cn/visualstudio/msbuild/msbuild-task-reference?view=vs-2019
<None Include="../bin/VideoPlayer/* " Exclude="../bin/VideoPlayer/ *.pdb">
<Link>VideoPlayer/%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="../bin/VideoPlayer/**/*">
<Link>VideoPlayer/%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
这个就是最终效果,非常感谢。