MSBuild add file to primary output
问题 How can i add some custom file created by MSBuild to project output? i.e. I have blank .csproj, I add Exec task to Target that generates some file.txt and now i want to include this file into "primary output" or "content files". Thanks, Marek 回答1: Generally, you just need to include the output files you have and then copy them to the output directory. <CreateItem Include="$(SourcePath)\file.txt"> <Output ItemName="FilesToCopy" TaskParameter="Include" /> </CreateItem> <Copy SourceFiles="@