I have an ASP.NET MVC application project, along with various other projects within a Visual Studio solution. The different projects use various versions of the NPoco library as follows:
I'm using Visual Studio 2015 Update 3 14.0.25422.01.
For some reason, when I launch this application in the debugger using the normal Start Debugging command in Visual Studio, it launches, but it also produces the following warning:
If I press Continue Debugging, everything seems to still work as usual, including breakpoints.
This problem only started happening recently.
To enable or disable Just My Code in Visual Studio, under Tools > Options (or Debug > Options) > Debugging > General, select or deselect Enable Just My Code.
If we build the project in “Release” mode, the GC. Collect method causes the Timer t to be collected because no variable referring to the Timer t. However, when we start the exe by clicking the “F5” button ("Release" mode), Visual Studio debugger will attach the exe process.
Disable this option under Debug->Options->Suppress JIT optimization on module load (Managed only).
A connect report submitted before:
https://connect.microsoft.com/VisualStudio/feedback/details/2116788/flag-optimize-is-passed-to-the-debugger-even-while-the-build-settings-optimize-code-is-not-enabled-on-mvc-c-web-projects-when-using-just-my-code.
Please also make sure that all projects are in debug mode, Optimize code was unchecked like this case:
VS2015 Project no longer runs in debug mode
"Optimize code" option is there on visual studio project level. Remove that for debug mode.
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