I just started to have the same issue recently. I did not open ASP .NET project for a while, and now I can't build it. It's full of razor (RZxxxx) and non-found references (CSxxxx) errors. I think that the actual root cause might be the Windows update from 10 to 11. Trying right now to restore my VS. Any ideas what else I can try? Already tried everything suggested above.