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

Developer technologies | Visual Studio | Debugging
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} vote

Answer accepted by question author
  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,431 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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.