very new programmer here,
I just completed a C# winform project and wanted to rename my project folder to something else (bad idea). After I renamed it, my code would not compile and gave me a CSC : error CS2001: Source file ‘myfile.cs’ could not be found.
I can see the file in the solution explorer and the project folder but cannot click on it in visual studio or I get an error – ‘The system cannot find the file specified. HRESULT 0x800700002’
The actual code that I wrote is still here, but trying to view the form designer is what gives the HRESULT error.
My debug last build feature still has a working version of the form if that matters.
If I need to include any additional information please be specific because I may not understand what you mean.
I’ve looked online for both of the errors that I could find but no one seems to have this specific issue. I’ve tried moving my project to a new one and opening the project folder directly in visual studio.
Renaming the project back to what it was did not reverse the issue.
Sweep the leg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.