I renamed a form and forgot to save my Visual Studio Project. Now I am getting this error:
The file does not support code parsing or generation because it is not contained within a project that supports code.
I can still see the original form name and when I double click the specific form this is the error I get:
the item does not exist it may have been moved, renamed, or deleted
How do I fix my problem? I just want access to the form I renamed and I am guessing the project is not reading for the new one (but unsaved) and is searching for the original which does not exist anymore.
Solved this problem from @KingOfArrows 's comment, but I may as well post it here. I was able to solve the issue by editing every instance of the old version in the .csproj file by:
unload project
in the solution vieweredit project file
(if it hadn't already appeared automatically), and then changing every reference of the old name to the new name in the textreload project
, causing everything to work properly.I hope this helps anyone if they run into the same issue.