How it works...

Press F5 to run your console application. You will see that the OS is displayed in the output:

Go to the bin folder of your console application and copy the files to a folder on the desktop of your Mac. Call that folder consoleApp. In Terminal, navigate to the folder with the copied files. You can do this by typing the command cd ./Desktop and then type ls to list the contents of your desktop. Check if the folder you created is listed, and if so, in Terminal type cd ./consoleApp. List the contents of the consoleApp folder again by typing ls. In my case, the DLL was called NetCoreConsole.dll. To run the code you wrote earlier, ...

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.