Hello @Rin,
Welcome to Microsoft Q&A forum.
May I first confirm following things:
- If you try to create another type of project, for example, a simple C# console app, will the same error appear?
- Does this error appear on .NET(like .NET 8) projects?
- If you change to target other versions of .NET Framework(like 4.7.2, 4.8), will the error appear?
As you have reinstalled the IDE but the error persists, I think this issue may be not caused by VS, but by cache, system environment, frameworks or some configurations. Try following:
- Run Visual Studio as administrator and create an ASP.NET Web application, but this time save it into another short, empty directory(like C:\MyProjects), see if this works.
- Rename following folders =>
C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_xxxxxxxx\ComponentModelCache
,%Temp%
(you may need to reboot your machine and then rename the Temp folder). - Update Windows OS.
- Open CMD as administrator, run
DISM.exe /Online /Cleanup-image /Restorehealth
, after it finishes running, runsfc /scannow
. - If you modified any Windows Registry keys, changed any system environment variables, customized any system settings, removed some system files, please try to recover them and test again.
- If there’s any limitation(like permission limitation, antivirus, security management software, group policy…) on your machine, try to double check and confirm that they won’t block VS from creating related ASP.NET Web application files.
- Try to manually download and install newer or other versions of .NET Framework, see if this works.
Feel free to let us know the results :)
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.