MSBuild add file to primary output -
how can add custom file created msbuild project output? i.e. have blank .csproj, add exec task target generates file.txt , want include file "primary output" or "content files".
thanks, marek
generally, need include output files have , copy them output directory.
<createitem include="$(sourcepath)\file.txt"> <output itemname="filestocopy" taskparameter="include" /> </createitem> <copy sourcefiles="@(filestocopy)" destinationfolder="$(outdir)" />
there's variable $(outputdirectory) immediate project. there many other properties may find useful also:
https://msdn.microsoft.com/en-us/library/ms164309.aspx https://msdn.microsoft.com/en-us/library/ms164313.aspx
Comments
Post a Comment