Where is full documentation about the csproj format for .net core?

ぐ巨炮叔叔 提交于 2019-12-12 09:30:01

问题


Is there a full documentation about the csproj format for .net core projects?

I was looking for a way to copy files before building. After some searching I found a solution, but I can't find the documentation for this. Does it overwrite files? Are there extra options, ...

  <Target Name="CopyMyFiles" BeforeTargets="Build">
    <Copy SourceFiles="../../someFile.js" DestinationFolder="dest/" />
  </Target>

I found the additions for .net core here, but there is nothing about copy.
Does that mean copy is somehting from msbuild?
The target element is documented here But I don't find anything about copy. Is there a list of possible tasks somewhere?


回答1:


The documentation for the tasks included in MSBuild is here, with a page specifically on the copy task. Sadly, there are many features of the .NET SDK that aren't documented and probably only useful in special scenarios. I find myself looking at the source code of MSBuild, the .NET MSBuild SDK and the Web Sdk quite often to see how it is built and what can be done using it - e.g. while researching this answer.




回答2:


I'm coming here after converting a project.json to csproj. The mechanism for copying other files after compile, when the files are not in the project directory, seems wonky and still tracking it down. The dotnet migrate tool converts publishOptions stuff to a "None..." element for which the detailed docs are a bit sketchy...



来源:https://stackoverflow.com/questions/45096549/where-is-full-documentation-about-the-csproj-format-for-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!