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, type dotnet NetCoreConsole.dll and press Enter:

You can see that the code is run and the text output in Terminal.

If, by any chance, you find that trying to run the dotnet command (after installing the .NET Core SDK) results in an error saying command not found, try the following. In Terminal type the following and press Enter: ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/, which adds a symbolic link. Running the dotnet command should work after this.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.79.206