Visual Studio not recognizing file after changing from erroneous extension

Viewed 596

I've been struggling with this for a couple of hours and then I just fixed that.

Problem is, when I was creating another .cpp file I misspelled the extension with .cp and then I immediately changed that file back to .cpp with Visual Studio's rename file feature.

The linking just stopped working after that. It was saying to me that i have unresolved external. My .h file couldn't be linked with that .cpp file which I renamed from .cp.

Somehow, when I created the file with a wrong extension, VS remembered that and even after renaming that file back to the correct extension, it still didn't recognize it.

I fixed my problem by just creating a new .cpp file (this time without an error), and everything just started working.

Has anyone experienced that before? Someone probably knows but I have not found anything related to this problem yet.

1 Answers
Related