- "Visual Studio Code" a cross-platform editor and lightweight IDE with C# support
- Xamarin - C# for Linux (Mono) and Android
- "Visual Studio for Mac" - https://www.visualstudio.com/vs/visual-studio-mac/ - C# for macOS and iOS
- Cross-platform .NET Core (DNX) - https://www.microsoft.com/net/core
C# itself is a language that is, in fact, platform agnostic. The .NET Framework's Base Class Library was originally rather Windows-centric until recently (though there were open-source cross-platforms in dotGnu and Mono).
The main Windows-only things in .NET today are:
System.Windows.Forms
: WinForms - a wrapper around Win32 and hWnd)
System.Drawing.*
(a wrapper around GDI)
- WPF: There is next-to-nothing about WPF that inherently ties it to Windows, however there has been no serious attempt to port it to other platforms. The closest is Moonlight, which is Mono's version of Silverlight, however it is not a drop-in replacement for WPF.
- and of course, the
Microsoft.Win32
namespaces.
There are other things, like System.Diagnostics.Process
which are clearly designed around the presumption of a Windows environment (e.g. Process.Handle
).
Another problem to contend with is bad assumptions in third-party libraries, such as code always using \r\n
for line-breaks instead of Environment.Newline
, or code assuming the use of driver-letters and backslashes in paths.