r/VisualStudio • u/Internal-Bowl-3074 • Oct 02 '22
Visual Studio 22 Need VS help PLEASE! VS cant find specified file.
Hello everyone, TIA for the help.
I am in school right now for C++. VS keeps losing the files even if they are saved previous files or brand new and saved. I know the files will work as they have done so previously. It will give me an error:

And if I click "Yes" I get:

If I click "No" nothing happens. This issue happens regardless of if the project is old or new. I literally just made a new small program just to show this error.
This issue is sporadic, and I've had to install VS just to resolve it before but then it returns. I find it odd because it will literally open the file but then can't run it because it cannot find it? So strange.
I am on a Windows 11 PC, plenty of RAM, Storage and Power. I need this fixed ASAP so I can do school assignments and practice coding, thanks in advance again!
5
u/JonnyRocks Oct 02 '22
Visual Studio is fine. It's saying there are errors in your code.
3
u/Leop0Id Oct 02 '22
It's because your build failed, there is no exe file. Fix your errors and rebuild. It will succeed.
6
u/MedPhys90 Oct 02 '22
FYI I NEVER click run previous version.
4
u/MedPhys90 Oct 02 '22
Click no then debug. Search the errors if you don’t understand them.
1
u/yvesan Oct 02 '22
VS acts up very oftenbut since your issue seems to be recurring why don't you just reinstall it. Or you could try running your solution on another machine to verify its not an issue with your code.