完整的 .NET Core 目标框架的预处理器符号列表
程序员文章站
2024-02-20 08:01:10
...
觉得应该有用,保留下。
目标框架 |
符号 |
.NET Framework |
NETFRAMEWORK, NET20, NET35, NET40, NET45, NET451, NET452, NET46, NET461, NET462, NET47, NET471, NET472, NET48 |
.NET Standard |
NETSTANDARD, NETSTANDARD1_0, NETSTANDARD1_1, NETSTANDARD1_2, NETSTANDARD1_3, NETSTANDARD1_4, NETSTANDARD1_5, NETSTANDARD1_6, NETSTANDARD2_0, NETSTANDARD2_1 |
.NET Core |
NETCOREAPP, NETCOREAPP1_0, NETCOREAPP1_1, NETCOREAPP2_0, NETCOREAPP2_1, NETCOREAPP2_2, NETCOREAPP3_0, NETCOREAPP3_1 |
例如
#if NET461
`````
#else
`````
#endif
上一篇: 从豆瓣网站设计谈网站重构