I got the same error on a new project I started yesterday. I’ve generated scaffolds for my two models and then I had to rename one of them and then, after renaming it, I tried generating the scaffold again & got this weird error saying the same thing: “Identifier […] has already been declared”. The main trouble is that this error is coming from the service test file, which I tried deleting, regenerating, etc. but the error is the same no matter what I do, the only solution I managed to work was recreating the entire project and only keeping the DB connection string on .env