How can I stop Visual Studio 2022 from trying to open deleted files when I start debugging?

Juan Dent 236 Reputation points
2022-06-06T19:55:29.897+00:00

I have a VS 2022 solution with C++ native projects and when I start debugging several dialog boxes open all with the message "The document cannot be opened. It has been renamed, deleted or moved."

I have to click Ok on each dialog every time before I can get to debugging and it is very annoying!! How can I "tell" VS2022 to forget about these files it tries to open?

Thanks,
Juan Dent

Developer technologies | Visual Studio | Debugging
Developer technologies | C++
{count} votes

Accepted answer
  1. David Lowndes 4,726 Reputation points
    2022-06-06T22:40:53.52+00:00

    Under your project's directory, you'll find a hidden .vs directory structure like this

    YourProject\.vs\YourProject\v17
    

    The .suo file should be there:

    If deleting the .suo file doesn't do it, I'd try deleting the whole of the hidden .vs directory branch.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Juan Dent 236 Reputation points
    2022-06-06T23:14:40.98+00:00

    problem solved by deleting .vs directory!! Thanks!!

    Juan

    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.