I have few batch files included in my c# project. which are set as Copy to outputdirectory as always. I want that copytooutput directory should be conditional.Is should be copied to output directory only if DefineConstants is Debug.
Whether the file will be copied to output is defined in a
ItemGroup.We can setup a condition for the such ItemGroup to control if the list of files should to be copied. You can unload the project and open the project file in the editor, and try to find the ItemGroup
which represents the list of the files. The following sample demos a txt file to be copied depends on the definedconstants.