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

参数的写法:"/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

posted on 2010-01-20 22:01  m2land  阅读(1073)  评论(0编辑  收藏  举报

导航