Visual Studio 2015 project no longer runs in debug mode

后端 未结 22 1173
萌比男神i
萌比男神i 2020-12-04 18:32

This is what I get even when I run in the Debug configuration:

The way I got this to show was by enabling "Just My Code" and warn if there

相关标签:
22条回答
  • 2020-12-04 19:07

    This started happening to me after applying Update 1. Existing projects started showing this, and I can replicate it with a brand new project. All configuration is set to DEBUG, and Optimize is not checked.

    The kicker is, running the project the first time (or after a Clean) runs just fine, without any message. Stopping, then re-running the project (note - the project is not rebuiblt) will display the dialog.

    The only solution is to turn off the Just My Code option - which seems a hack, as it was on previous to Update 1 without any problems.

    0 讨论(0)
  • 2020-12-04 19:10

    I tried pretty much everything in this list, but in the end I fixed this by opening the solution properties and switching from "Multiple startup projects" to "Single startup project" and back again.

    1. Right-click on the solution and choose "Properties"
    2. Under "Common properties" change the selection "Multiple startup projects" to "Single startup project"
    3. Click OK
    4. Run debugging
    5. End debugging and repeat steps 1-3, but switch back to "Multiple startup projects"
    6. Run debugging again with multiple projects
    0 讨论(0)
  • 2020-12-04 19:11

    For me, it was a NuGet reference from a private NuGet server. I don't know how it was compiled, but changing the reference to a project reference got me past the problem.

    0 讨论(0)
  • 2020-12-04 19:13

    After viewing the link by Patrick as a comment to the question, someone noted a workaround which was to stop the site in IIS Express. I was able to prevent this same problem from arising by doing just that after stopping the debugger in Visual Studio.

    However, I was looking into it more, and I believe it could also be related to the 'Edit and Continue' setting for the debugger. When I disabled that in the menu ToolsOptions... of Visual Studio, I no longer had the problem. But then that would prevent you from using the Edit and Continue feature, so I am not sure if that's worth it to you.

    Menu ToolsOptionsDebuggerEdit and Continue (scroll to the bottom of the General list) → uncheck the Edit and Continue checkbox.

    I also experienced this suddenly after installing Update 1, but it could just be that I had this setting off in the first place...I am not sure though.

    0 讨论(0)
  • 2020-12-04 19:15

    Use the Configuration Manager to check what the actual settings are for the Debug configuration - it's at menu BuildConfiguration Manager... - in case they are set to use Release:

    Also, make sure the project is defining DEBUG correctly, and that "Optimize Code" is not checked:

    0 讨论(0)
  • 2020-12-04 19:16

    I spent two days, and it looks like Reset the Visual Studio 2017 Experimental Instance helped me.

    0 讨论(0)
提交回复
热议问题