Disable EnableOptimizations mode in debug mode
1 answer
The easiest way is to use the #if
Preprocessor directive
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
If your application is running in debug mode, Visual Studio detects DEBUG
for you. On the other hand, if your app is running in release, it DEBUG
will be undefined.
To check if a release version is installed , you cannot determineDEBUG
#if !DEBUG
BundleTable.EnableOptimizations = true;
#endif
PS: There is no flag for obvious reasons RELEASE
.
+9
source to share