Hello @Aamir Khan,
Welcome to Microsoft Q&A forum.
Do you still remember what had changed before this issue appeared, such as updating Visual Studio 2022(try to rollback VS from VS Installer > More > Rollback to previous version), installing and using some extensions(try to disable them or remove them temporarily to check), modifying some configurations like path, name and so on?
Please also try to clean project cache by removing the hidden .vs folder in solution folder and bin/obj folders, then rebuild the solution.
If possible, try to clean VS cache(rename/remove ComponentModelCache
folder in C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX
directory), and try to reset VS settings by running devenv /ResetSettings
in Developer Command Prompt for Visual Studio 2022 Professional
.
Besides, if you are using some NuGet packages, please try to clean NuGet cache and restore the packages.
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.