Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"You are debugging a release build" when debug is selected

I am attempting to debug my solution, which is set to start a few different projects. One of these projects is giving me an error when it is hit saying that it is running in release mode. This same solution has been running fine on Windows 7, but I just switched to a new machine running Windows 10 and am now getting this error message. I have attempted cleaning the solution and doing a rebuild with Debug and Any CPU selected to no avail. The code that is failing is within a class library that is referenced by a Web Api project. I am able to send a request to the Web Api that does not require the use of the class library and that works as intended.

Visual Studio Error Message

like image 483
dmoore1181 Avatar asked Dec 08 '22 12:12

dmoore1181


2 Answers

Try opening configuration manager in visual studio and ensure that all of the projects are set to debug, I assume that some are release.

enter image description here

like image 72
Ilya Chernomordik Avatar answered Jan 29 '23 00:01

Ilya Chernomordik


Go to Project->Properties->Build

then Uncheck Optimize Code

like image 44
Bob Chase Avatar answered Jan 29 '23 01:01

Bob Chase