在MSBuild.exe中使用条件编译(Conditional Compile)

简介: 参数的写法:"/p:DefineConstants=MY_PREPROC_FLAG YET_ANOTHER_FLAG" 注意,在使用 MSBuild 时,会出现C#项目中设置的输出路径无效的问题,这是要在MSBuild参数中加入:   参考:http://www.

参数的写法:"/p:DefineConstants=MY_PREPROC_FLAG YET_ANOTHER_FLAG"

注意,在使用 MSBuild 时,会出现C#项目中设置的输出路径无效的问题,这是要在MSBuild参数中加入:

<arg value="/p:OutputPath=YourOUtPutPath" />

 

参考:http://www.linqinpark.net/2009/01/13/MSBuildWithMultipleDefineConstants.aspx

相关文章
|
4月前
|
编译器 Linux C语言
CMake指定交叉编译指南:从编译器设置到验证 (CMake Cross-compilation Guide: From Compiler Setup to Verification)
CMake指定交叉编译指南:从编译器设置到验证 (CMake Cross-compilation Guide: From Compiler Setup to Verification)
1361 1
|
4月前
|
C语言 iOS开发 C++
使用visualstudio编译
使用visualstudio编译
67 0
|
10月前
|
存储 自然语言处理 编译器
编译链接(Compile Link)
编译链接(Compile Link)
121 0
编译pluma: pluma/Makefile.am:192: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
编译pluma: pluma/Makefile.am:192: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
108 0
|
Android开发 C语言 C++
ECLIPSE明明能跳到头文件,却提示Unresolved Inclusion,怎么办?
ECLIPSE明明能跳到头文件,却提示Unresolved Inclusion,怎么办?
232 0
|
数据可视化 编译器 Windows
CMake“cmake is not able to compile a simple test program”错误 的解决方法
CMake“cmake is not able to compile a simple test program”错误 的解决方法
728 0
|
数据可视化 编译器 Windows
关于 CMake“cmake is not able to compile a simple test program”错误 的解决方法
关于 CMake“cmake is not able to compile a simple test program”错误 的解决方法
关于 CMake“cmake is not able to compile a simple test program”错误 的解决方法
|
开发工具 Android开发
【错误记录】Visual Studio 中编译 NDK 报错 ( no matching function for call to ‘cacheflush‘ cacheflush(); )
【错误记录】Visual Studio 中编译 NDK 报错 ( no matching function for call to ‘cacheflush‘ cacheflush(); )
228 0
【错误记录】Visual Studio 中编译 NDK 报错 ( no matching function for call to ‘cacheflush‘ cacheflush(); )