In 2016 we’ve seen some exciting new tech things arrive: VR head-mounted displays from Oculus, HTC, Sony with VR games we dreamed about in the 1990s; PS4 Pro; nVidia 16nm Pascal chip. What I’m most excited about, though, is finally here after a decade of waiting: Microsoft .NET Core cross-platform support. Now I can write, build, and run .NET software on macOS, Linux, or Windows. Use the console, editor of choice, or Microsoft VS Code to write C# code, test, debug, and target multiple platforms. It’s about time! (Sure, Mono is nice, but this is cool!)

To get started with .NET Core, check out the guide at docs.microsoft.com/en-us/dotnet/articles/core/index and try out some tutorials. Find the SDK at https://www.microsoft.com/net/core.

How to setup .NET Core SDK on Mac

Follow the .NET Core installation instructions, which are a bit out of date as of this writing, so I’ll summarize the steps and note the difference here.

1. Use Homebrew to get OpenSSL

Enter the commands in console as shown.

2. Use the installer

3. and 4. Follow the instructions to test everything is working.

Creating a new application using “dotnet new” may be run immedately and should output “Hello, World!”

mkdir hwapp
cd hwapp
dotnet new
dotnet restore
dotnet run

If not working

Try the following (edit for your version of .NETCore):

sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Security.Cryptography.Native.dylib

5. Install Visual Studio Code

You may write and debug .NET Core applications on Linux or macOS using VS Code. Download at code.visualstudio.com. Once up and running, install the C# extension by selecting View->Extensions and typing in “C# for Visual Studio Code” and click the install button after “C# for Visual Studio Code (powered by OmniSharp).”

VSCodeCoreScr

VS Code 1.5 introduces icon themes and includes Seti UI making file type quicker to identify.

VSCodeSetiTheme

Setup .NET Core SDK on Linux Mint 18

Follow the .NET Core installation insructions for Ubuntu 16.04. For VS Code, download the .deb package from code.visualstudio.com. It’s that easy!

LinuxMintVSCodeScr

Configure C

Add extensions using Ctrl+Shift+X (Cmd+Shift+X) and start typing:

  • c# for visiual studio code
  • c# xml documentation

Resources and tutorials to get started


Visual Studio Code, Windows, and .NET Core are trademarks of Microsoft. macOS is a trademark of Apple. Linux® is a registered trademark of Linus Torvalds.