For some absurd reason several (not all) classes disappeared from the class library in my asp.net core mvc solution. When I reopen the solution, the missing classes are present. But when I build the solution, they disappear.
When I pushed the project with the missing classes to git, the shown git changes do not mention any deleted classes.
When I try to create the missing classes again with the same name, visual studio messages that this class already exists, even though I can not see or access it.
The only thing I did since the last push at which they were still present, is adding csv files to the bin/debug folder and trying to set them as resources, which hardly should affect these classes.
It turns out the problem was caused by the convoluted syncing practices of OneDrive. I used to backup everything in OneDrive, but now excluded everything containing code, which does not need to be backed up anyway because of git. The classes showed up again right after.