【问题标题】:Is there a way to tell what version of the .Net Framework is being used by a #define有没有办法告诉#define 正在使用哪个版本的.Net Framework
【发布时间】:2011-06-08 16:47:39
【问题描述】:

我有一些在多个项目之间共享的 .cs 文件,如果可能的话,如果我尝试编译到 2.0 框架,我希望能够#define 去除属于 3.5 框架一部分的东西。是否有内置的#define 来执行此操作?

【问题讨论】:

标签: c# visual-studio-2010


【解决方案1】:

您需要根据 $(TargetFrameworkVersion) 定义常量。

看看this question

【讨论】:

    猜你喜欢
    • 2018-05-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-03
    • 2011-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多