error is Operation is not valid due to current state of object
it shouldn't be show this error, I don't know how to figure out this..I checked every where not able to what issue is, may be the visual studio 2022 erro or the error while creating the new project of dotnet web application
Maybe this helps:
Delete the contents from the following folders:
C:\Users\%userprofile%\AppData\Local\Microsoft\VisualStudioC:\Users\%userprofile%\AppData\Local\Microsoft\VSCommonSometimes, you need to go to:
[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDEand run
devenv /resetuserdata.Expect, that all of your user settings such as Visual Studio layout, linked Microsoft account or start page might disappear.
Reference from: Visual Studio error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015.
There are many answers in this link that are of reference value
If the answers in this link still cannot solve your issue, it is recommended that you use Visual Studio Installer to repair or update Visual Studio.