right now I have 3 build configurations: Debug, Release and Cfg1
I noticed that Cfg1 would produce dll of the same size as Debug (larger than Release), so using trial and error I've found that adding this code in project.json:
"configurations": {
"Cfg1": { "buildOptions": { "optimize": true } }
}
would make the dll the same size as Release
however , for both Release or Debug I couldn't find any configuration in project.json or in the solution file that would set optimize: true, so where is the configuration for Debug and Release is it embedded somewhere ?
Yes, the configurations of Debug and Release are hardcoded in .Net Core CLI code.
In effect, the default configurations are:
"configurations": {
"Debug": {
"buildOptions": {
"define": [ "DEBUG", "TRACE"],
"optimize": false
}
},
"Release": {
"buildOptions": {
"define": [ "RELEASE", "TRACE"],
"optimize": true
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With