TL;DR个
ContentWithTargetPath
实际上只是<Content ..><TargetPath>..
的内部MSBuild表示,还是这真的是一个"适当的"MSBuild配置项?
只有一个(1!)我们的几百个项目中包含一个条目
<ContentWithTargetPath Include="..\x-model\v6\stuff.json">
<Link>data\stuff.json</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>stuff.json</TargetPath>
</ContentWithTargetPath>
我试着找到any个文档,但虽然在S.O.上提到了many times个.在这里,似乎没有此MSBuild项的any文档.
我进一步发现在GitHub的一个第https://github.com/dotnet/msbuild/issues/2795期中提到了ContentWithTargetPath
和_NoneWithTargetPath
.
我还为<Content ...>
列出了TargetPath
可选子条目的Common MSBuild project items reference(但是为<None ...>
列出了not,尽管似乎没有人支持它).
此外,据我所知,无论我在实际的csproj文件中使用None
、Content
还是ContentWithTargetPath
作为元素,<TargetPath>
和CopyToOutputDirectory
的行为都完全相同.
谁能解释一下,为什么我可以在S.O.上找到50多个MSBuild属性的条目,但在MSBuild的MS文档中没有记录,甚至在任何DotNet GitHub问题上都没有显著记录?此配置项是否有任何历史记录?