Why do you believe the settings are the same? I created a quick VB console app in 16.8.4 and the Debug configuration does not enable optimizations and the Release configuration does as I would expect. Decompiling the generated code for both debug and release builds indicates the assembly has the appropriate optimization flags set for the JIT when it runs later on.
"Enable Optimizations" not differentiating between Debug and Release configuration for AnyCPU
I am developing a Solution with a good few VB.NET projects in it.
In the x86 and x64 configurations I have made sure that "Enable Optimizations" is checked in the Release configuration and unchecked in the Debug configuration.
In the AnyCPU configurations, however, it doesn't seem to be able to have different settings between the Release and Debug configuration. When I check the checkbox, it will show as checked both in the Release and Debug configuration. When I uncheck it, it will show as unchecked in both.
This wouldn't be a big deal as I could just as easily debug the software in an x86 or an x64 configuration, except for the fact that the software is using Add-In Express and it MUST be built for AnyCPU.
Is this a known bug? Can it be addressed? Am using Visual Studio 2019 and keeping it up to date.
1 additional answer
Sort by: Most helpful
-
Pino Carafa 121 Reputation points
2021-01-27T15:53:37.293+00:00 I accepted @Michael Taylor earlier answers but the real "aha" moment came when I was looking at his or her comments on @Tianyu Sun-MSFT 's earlier answer.