I just got this issue using VS 2019 community edition.
I didn't have duplicate .resx files. I didn't have duplicate .cs files.
I couldn't find the solution online.
To fix the problem, I cleaned the solution and then restarted VS.
Not sure why, but it worked. Hope this helps.