visual-studio-2010 - 微软内部版本 : Access compiler sett

我正在编写我自己的 MS 构建脚本,我将其导入项目文件 (*.vcxproj)

我想根据动态使用的 C 运行时有条件地执行任务。我尝试了以下方法:

Condition = " '$(RuntimeLibrary)' == 'MultiThreadedDLL' "

但是 $(RunitmeLibrary) 不是属性而是 ClCompile 的参数。

有没有其他方法可以编写一个条件来检查运行时是动态喜欢还是静态喜欢?

问候

最佳答案

您要查找的值是 ClCompile 项组的元数据。使用这个:

Condition=" '%(ClCompile.RuntimeLibrary)' == 'MultiThreadedDll' "

我将其添加到 vcxproj 的底部以查看当前设置是什么:

 <Target Name="BeforeClCompile">
    <Message Text="BeforeCompile: RuntimeLibrary=[%(ClCompile.RuntimeLibrary)]" Importance="high" />
 </Target>

关于visual-studio-2010 - 微软内部版本 : Access compiler settings in a subsequent task,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4721879/

相关文章:

regex - Dreamweaver 用正则表达式替换

c - 将多维数组传递给函数 C

wpf - 链接内容不适用于资源词典

java - 尝试执行 jar 时出现错误 java.lang.ClassNotFoundExcep

oop - 单例类 : static properties or non-static proper

apache - 如何让邮件发送到特定地址触发 Web 服务器上的操作?

jsp - 纯文本 JSP 响应

date - VB6 儒略日期字符串到日期对象

.net - SqlCE 4.0 在 Visual Studio 2010 中是否有自己的连接提供程

entity-framework-4 - 如何首先在 EF4 代码中将表拆分为多种类型?