Visual Studio 2019 No Longer Debugging

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

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.
5,176 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.
1,002 questions
0 comments No comments
{count} vote

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

    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.

    0 comments No comments

1 additional answer

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

    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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.