Fragrance Of Programming
Navigate to: File-->Preferences-->Workspace Settings
Next in the right pane add the below code:
Microsoft released .Net API Analyzer which are of great use for writing/porting the cross platform code.
Many times you might have encountered that the function which you have written in Windows might not work in Linux, also many times APIs get deprecated. The API Analyzer is a Roslyn (remember Roslyn is the name of the C#/.NET compiler) analyzer that's easily added to your project as a NuGet package. All you have to do is add it and you'll immediately start getting warnings and/or squiggles calling out APIs that might be a problem.
Below is the console app which I have created and added the analyzer NuGet package in that.
Now I will use only Windows specific API which won't work on any other platform
Now build the application, and you will get detailed warning about the API that doesn't work everywhere.
You can even watch the YouTube video by Olio from .NET team, which shows API Analyzer and how it works.