Terminal in Visual Studio (17.4) for Mac turns purple and code doesn't run on console

154 Views Asked by At

I recently downloaded Visual Studio for my M2 MacBook Air, the program worked as expected for a few days, and my simple programs ran fine on the console, but then out of the blue, terminal turned purple, and doesn't allow me to run my program on it.

The problem occurs when I press the button that usually runs the code. The program then opens up the terminal, but it doesn't run my code.

I tried uninstalling and reinstalling Visual Studio, that helped for a day or two, but the problem came right back.

I think the problem may have to do with trying to open .cs files just by double clicking them, and not opening them properly, as I may have done that when the problem first occurred, but I don't recall exactly what I did.

It's not only with a specific file I try to use, but with all files.

I'm completely stumped, and any help would be greatly appreciated!

Thanks in advance, I'm attaching a screenshot of the issue below:

screenshot of problem

1

There are 1 best solutions below

1
On

Remove the cache directory and restart Visual Studio

% cd ~/Library/Caches/VisualStudio
% ls                              
17.0
rm -rf 17.0

(French user)

Pour supprimer cet effet indésirable, essayez de :

  • fermer Visual Studio pour Mac
  • supprimer le dossier de cache
  • redémarrer Visual Studio