'How do I make my C# code for Unity in Visual Studio look/work like in the tutorial (picture)

I'm trying to make a mobile game with Playfab and Unity.
It's my first time using Unity and Visual Studio. Usually I'm only using VS Code.
The code is working, but it's not looking like in the tutorial and I also don't get the code recommendations of Playfab when typing my code.
So basically I want my code to look like this:

Example of the code in the tutorial I'm watching

instead of this:

This is how my code looks like

Maybe I've done something wrong when importing Playfab or installing Visual Studio.
I've tried reinstalling Visual Studio (didn't work) and I have no idea how to go on now.



Solution 1:[1]

For anyone wondering, I figured it out myself by now.

You have to go in Unity -> Edit -> Preferences -> External Tools
There you select Visual Studio at External Script Editor
And check everything at "Generate .csproj files for"

Solution 2:[2]

Those lines are commented because of Unity Platform Dependent Compilation feature. They only work when in a specific platform, which is Android. Simply switch the target build to Android to make it work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kypindor
Solution 2 Seth DU - MSFT