在以前的.NET Core中,我可以执行以下操作: -
{
"configurations": {
"Debug": {
"compilationOptions": {
"define": [
"DEBUG",
"TRACE"
]
}
},
"Release": {
"compilationOptions": {
"define": [
"RELEASE",
"TRACE"
],
"optimize": true
}
}
}
}
但它似乎被buildOptions取代,但是是一个配置。现在的方法是什么?如何在最新的.NET Core中创建它?
答案 0 :(得分:2)
只需将compilationOptions
替换为buildOptions
"configurations": {
"Debug": {
"buildOptions": {
"define": [ "DEBUG", "TRACE" ]
}
},
"Release": {
"buildOptions": {
"define": [ "RELEASE", "TRACE" ],
"optimize": true
}
}}