Skip to content

[Solved][Visual Studio] Cannot Display Any Code

The Visual Studio is the first IDE I used in university, it was used to write Go game program when the professor wanted to make a project. But every time I compile my code, the laptop would crash…

Later, in order to use Unity to develop some interesting mini games, I did not leave Visual Studio. After all, the function auto-complete and the acceptable parameter data type of the prompt function are really easy to use.

In this way, even after I bought a MacBook Pro and transferred all the data to Mac OS, I still installed Visual Studio to make games. But I would like to advise everyone here, I feel that it is not suitable to use MBP to develop games…


Problem

What I want to record today is such a problem: One day when I opened Unity and planned to continue developing the game, I found that the code I wrote before could not be displayed on Visual Studio!

Hurriedly search on the Internet, and actually found that on the official website of Microsoft Visual Studio, someone asked the same question: https://developercommunity.visualstudio.com/t/visual-studio-for-mac-not-displaying-code/182046


Solution

Method 1: Open the panel to confirm that you have really opened the required project path (I still can’t see it)

Use View > Solution to confirm that you have indeed opened the current project.

But this is of no use to me. I did open the current path and confirmed that the .cs script was opened, but I couldn’t see any code.

By the way I check the file via vim editor, so the files are actually exist.




Method 2: Update (Successes)

Update your IDE… but why? Is my Mac OS updated after I don’t know something, and the old version of Visual Studio shows conflicts? The amazing thing is that I can actually see the code after the update!

Use Visual Studio > Check for Updates…


References


Read More

Leave a Reply