Visual Studio 2019 No Longer Debugging

asked 2020-08-17T21:32:15.49+00:00
PT6 96 Reputation points

Hello, got an interesting predicament here. I was coding a program, and decided I wanted to try and change the namespace by going into Project > MyProjectName Properties. Under Application, there is a Default Namespace location there, so I wanted to change it. However, when I did, it broke my program and it no longer debugs or runs. First, it runs and ends, and the second time you try and debug it, you get an error (see below). What I've found is that the .exe file was deleted the first time it was rerun under the new namespace.

I tried changing the namespace back, building, and rebuilding, yet despite the successful messages for those builds/rebuilds, the same thing keeps happening: the .exe runs and ends with no results, followed by it deleting and failing afterwards. Any ideas as to what happened, and how I can fix it without copying and pasting my entire project into a new project file?

Thank you!

18112-debugerror2.png

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,403 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
694 questions
No comments
{count} votes

Accepted answer
  1. answered 2020-08-18T21:08:08.843+00:00
    PT6 96 Reputation points

    So I did that, and re-ran the program, but it was vanishing again. I realized that it was MalwareBytes that was quarantining my .exe each time. I whitelisted my folder, and the issue stopped happening.

    No comments

1 additional answer

Sort by: Most helpful
  1. answered 2020-08-18T09:58:06.843+00:00
    Dylan Zhu-MSFT 6,346 Reputation points

    Hi PT6-5539,

    Please try with the steps below:

    • Delete .vs, obj, bin folder, then rebuild your solution
    • Run VS as administrator, then rebuild your project or solution

    Please note that backing up related files before deleting them.

    Best Regards,
    Dylan

    No comments