Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: C#:为整个项目全局声明预处理器符号(如调试)
我可以在项目中设置#NOTEMBEDDED定义,以便在调试时遇到
#NOTEMBEDDED
#if NOTEMBEDDED #endif
在各种源文件中它会承认它并落入 if 语句?
将其添加到项目设置中,右键单击项目,选择属性,在构建选项卡下有一个“条件编译符号”。
你在那里输入你的条件。
转到项目属性中的构建选项卡并将其添加到Conditional compilation symbols框中。
Conditional compilation symbols