Hello @Azureus,
Welcome to Microsoft Q&A forum.
We may first check and confirm that the error message says correctly or not correctly.
When the issue appears, please right-click your project => Open Folder in File Explorer => confirm that the GUI.cpp file exists => make sure that the file has the same name with the displayed item in VS Solution Explorer => go back to Visual Studio => right-click your project => Unload Project => right-click it again => Reload Project => Build your project => double click the GUI.cpp file and check if it opens without any errors.
If the GUI.cpp file does exist, and it wasn’t renamed, removed or deleted, then please check following:
- Cache: Close VS => go to solution folder => remove the hidden
.vs
folder => open VS and try to open GUI.cpp file again. - VS settings: Reset VS settings by running
devenv /ResetSettings
command inDeveloper Command Prompt for Visual Studio 2022
and repair Visual Studio from Visual Studio Installer => More => Repair. - Extensions: Did you use any extension which may remove/rename files automatically? If so, please try to disable them.
- Project configurations: Did you set any configurations in your project/project file/project properties like pre-build event/post-build event which may remove the files?
- Project synchronization: Is there any other team member who is also developing this project may change something?
Please feel free to let us know the results.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.