Proper way to put comments in build events command line?

.NetVisual StudioVisual Studio-2010

.Net Problem Overview


What's the proper way to put comments into the pre/post build event command line?

.Net Solutions


Solution 1 - .Net

Use REM: http://www.robvanderwoude.com/comments.php

An example:

REM signtool sign /a $(TargetPath)
xcopy /Y "$(TargetPath)" "C:\Deploy\$(TargetFileName)"

Solution 2 - .Net

You can also use double colons ::

:: My comments
xcopy /Y "$(TargetPath)" "C:\Deploy\$(TargetFileName)"

I prefer these to the REM keyword in command line (and bat files).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSurajView Question on Stackoverflow
Solution 1 - .NetBrandonZeiderView Answer on Stackoverflow
Solution 2 - .Netinliner49erView Answer on Stackoverflow