Other similar but to my knowledge non-related questions:
How to recreate said bug/error:
The error occured when I deleted a Release folder I'd accidentally copied over from a project in another solution. All now non-functional class names are derived from the object files within that Release folder.
Solution:
I have no solution.
My questions are:
Have anyone else had this or a similar issue?
If so, have you solved it and what is your solution?
I am open to all suggestions and while this 'bug' isn't making programming impossible it is quite annoying not being able to use frequently used class names.
Yeah, also saw that.
I think I have created a C++ class, decided I don’t like it, reverted changes using github app. But the name was good, so I tried creating same class again. Saw the exact same error as you’re having.
The name polluted the sqlite database. And because I had that VC.db in my .gitignore, git hasn't reverted that.
To fix, quit visual studio, delete the file $(SolutionName).VC.db in your $(SolutionDir) folder, restart visual studio, clean and rebuild your project[s].
Update: Modern versions of Visual Studio usually keep these SQLite databases inside .vs
folder under $(SolutionDir).
Seems like VS caching issue. I too faced this issue and your solution did not work for me either.
What I did is add a Class with different name lets say MainGame1
and then it allowed me to add. Then I just renamed the Class name, CPP and header file name to my like.
Manually create example.h and example.cpp in Solution directory then:
Add
-> Existing Item...
-> add created file to your project.
This trick work for me after clean $(SolutionName).VC.db file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With