.net 在构建事件命令行中添加注释的正确方法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5626166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 15:27:54  来源:igfitidea点击:

Proper way to put comments in build events command line?

.netvisual-studiovisual-studio-2010

提问by SFun28

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

将评论放入前/后构建事件命令行的正确方法是什么?

回答by BrandonZeider

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

使用 REM:http: //www.robvanderwoude.com/comments.php

An example:

一个例子:

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

回答by inliner49er

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).

与命令行(和 bat 文件)中的 REM 关键字相比,我更喜欢这些。