I moved a .NET Framework MVC Project to my personal laptop. Had same problem. Then tried to create a new project and VS2022 threw exactly this error. Then i reinstalled VS2022 completely. Visual Studio Installer > Visual Studio 2022 > Repair. And i closed OneDrive sync completely, because IIS Express config folder in Documents folder. Maybe it was trying to reach OneDrive Documents folder. Now it is completely working.