0

I am unable to debug my MVC application (this is the first time I have opened it in 72 hours). The only code changes I have made are to edit the action methods in a couple Controller files. When I attempt to debug, the following dialog box appears:

enter image description here

When I select "OK", I return an "unspecified error" dialog:

enter image description here

I have checked my web.config file and confirmed that debug is set to true:

 <compilation debug="true" targetFramework="4.5" />

I have also deleted and recreated my web.config file, but this has not fixed the error. There appear to be a dearth of explanations on Google or MSDN for why VS thinks I have debugging disabled. I am new to C# ASP.NET so I will admit that I don't even understand how the web.config file is copied and parsed when the app is launched. Perhaps the error is derived from a breakdown in this process? Thanks.

EDIT: I took two extra steps: 1) installed VS 2013 and tried launching the application, and 2) downloaded my project files from GitHub and recreated the web.config file, and they both reproduced the error.

Kanapolis
  • 311
  • 6
  • 22
  • 1
    Do you on Debug configuration? Does "Define DEBUG constant" checked in Project Properties -> Build? Does "Optimize code" unchecked in Project Properties -> Build? – xakpc Aug 17 '15 at 19:35
  • @xakz Yes, "Define DEBUG constant" is checked and "Optimize code" is unchecked. – Kanapolis Aug 17 '15 at 19:42
  • 1
    Looks like VS bug.. Did you try to clean (delete) /bin and /obj folders and rebuild? Did you try to clean VS cache? http://stackoverflow.com/questions/520593/how-do-you-clear-your-visual-studio-cache-on-windows-vista – xakpc Aug 17 '15 at 19:45
  • @xakz Cleaning the solution didn't fix the problem (I know that performing a "Clean" operation within VS doesn't always work, so I ran a Powershell script that successfully deleted /bin and /obj). Having a hard time locating the cache file based upon the instructions in the linked question. Do you know the directory address for VS 2015? – Kanapolis Aug 17 '15 at 20:14
  • @xakz Just a courtesy update that cleaning the cache didn't work either... My guess is that there was a .NET 4.6 compatibility issue. A lot of other bugs started cropping up in other programs; I ended up reformatting my disk and re-installing Windows 7. – Kanapolis Aug 22 '15 at 04:10
  • In my case, the startup project wasn't set correctly. And the one that was set didn't have any web.config, so the error prompt was correct from Visual Studio side. – Rajeev Pande Nov 18 '22 at 13:36

0 Answers0