hi, anytime i try to add new item to create a class and my visual studio 2019 stops working

Joined
Jun 3, 2021
Messages
12
Programming Experience
Beginner
Hi, i am learning c# by myself and recently i realized my visual studio 2019 couldn't create any new project, immediately after having two projects created and also the old project which i kept on constantly using to practice, once i try to open a new item to create a class for object, it sends this message; exception of type 'system.exception' was thrown.
Please, i will appreciate any answers to solve this issue. thanks.
 
Last edited:
Just to confirm are you saying that you cannot create new projects, you can't add new items to a specific project, you can't add new items to any project or a combination thereof? If the issue is not confined to one specific project, I think the first thing to do is to try repairing VS, which will replace any corrupt or missing files. Run the VS installer and select the Repair option and see how you go.
 
+1 about trying out Repair as a first step.

Also, if there is any chance your joined the bandwagon of using the Cascadia Code font? Try switching back to Consolas. VS2019 started randomly not opening code files for me when I tried switching over to Cascadia Code to see what the fuss was all about. I switched back to Hack as my default editing font and things worked better again., I'm trying out the Cascadia Code experience in VS Code instead.
 
Just to confirm are you saying that you cannot create new projects, you can't add new items to a specific project, you can't add new items to any project or a combination thereof? If the issue is not confined to one specific project, I think the first thing to do is to try repairing VS, which will replace any corrupt or missing files. Run the VS installer and select the Repair option and see how you go.
yh very sorry about that, actually its both and i did what you said but still the same issue persists ; when i try to open a new project, it sends this message(error parsing user settings file) and with the other it just shows the same message (Exception of type 'system.exception' was thrown).
 
+1 about trying out Repair as a first step.

Also, if there is any chance your joined the bandwagon of using the Cascadia Code font? Try switching back to Consolas. VS2019 started randomly not opening code files for me when I tried switching over to Cascadia Code to see what the fuss was all about. I switched back to Hack as my default editing font and things worked better again., I'm trying out the Cascadia Code experience in VS Code instead.
yh i checked that too and its exactly on Consolas. but the issue still remains
 
I'm away from my PC right now, but if the issue is corrupt user settings, you'll need to run "devenv.exe /reset" . That should bring you back to Out Of The Box settings. I need to get to a PC to confirm, that the parameter is really "/reset". In the meantime you can likely Google it yourself about devenv command line parameters.
 
Finally got to my PC. It's "/ResetSettings"
 
Something I've read a lot about lately is Windows ransomware protection with Controlled Folder Access. This is something I tested out a few years back and got into never ending troubles - maybe it has gotten better? Basically I had to disable it whenever I installed or updated any application, and I also had to manually whitelist many application executable paths for them to work properly in every day operations. The error messages and problems that occured were at no help, but I soon discoved that whenever something got weird or didn't work CFA was to blame. So if you have jumped on that wagon try install/repair with it disabled. Try running VS with CFA disabled if you encounter weird behaviour.

* One thing I remember is that I had to whitelist my own testing apps writing to Documents folder, else I got DirectoryNotFoundException or FileNotFoundException for existing paths.
 
If it still keeps crashing. Go to Help.Send Feedback>Report a problem... in Visual Studio. I was quite surprised how responsive they were when I reported two different issues is the past. I was expecting to perhaps get a response in 2-3 weeks time, but I got communications within 2-5 days.

Provide as much detail as you can when you put in your report. I know that whenever I receive a bug report, I am more willing to help out the user who gives me clear concise steps on how to reproduce the problem, details about their configuration, and observations of what seems to be going wrong, etc. rather than the vague bug report that just says something failed.
 
Something I've read a lot about lately is Windows ransomware protection with Controlled Folder Access. This is something I tested out a few years back and got into never ending troubles - maybe it has gotten better? Basically I had to disable it whenever I installed or updated any application, and I also had to manually whitelist many application executable paths for them to work properly in every day operations. The error messages and problems that occured were at no help, but I soon discoved that whenever something got weird or didn't work CFA was to blame. So if you have jumped on that wagon try install/repair with it disabled. Try running VS with CFA disabled if you encounter weird behaviour.

* One thing I remember is that I had to whitelist my own testing apps writing to Documents folder, else I got DirectoryNotFoundException or FileNotFoundException for existing paths.
cant find controlled folder access in my windows 10
 
hey, okay so I uninstalled and reinstalled through the visual studio installer. Opened it now but i cant create a project, cause the only thing it shows is blank solution. Please any thoughts on what to do.
 
After reinstalling, what is current version now? You should be at 16.10.3 at least by now.
 
Back
Top Bottom