Mac Setup
To set up the C# 201 environment on a Mac, it may look a little different than on a Windows computer. Follow the steps in the Environment Setup guide, but refer to this guide for some specific steps.
Installing Git
There are a few different ways to do it; one option is to use Homebrew. A user must have Administrator privileges to install Git on a Mac; make sure to log in as an admin user, then complete the steps below.
Installing Homebrew
First, install Homebrew.
- Open the Terminal app
- Copy and paste the command below into the terminal window, and press Enter/Return:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Enter your password, and press the Return or Enter key
- Press the Return or Enter key to continue
- Wait a few minutes for the process to complete
Installing Git from Homebrew
Once Homebrew has been installed, use it to install Git.
- In the terminal, enter the command below and press Enter/Return:
brew install git
- Wait for the process to complete
- When the process is done, enter the command below and press Enter/Return:
git --version
- Verify that a version appears
If the git --version
command returns a version, that means Git has been installed!
Installing .NET Core SDK
Next, install the .NET Core SDK. This will be necessary to run C# programs.
- Go to the .NET Core download page, and make sure macOS is selected
- Next to "Build Apps", click on the Download .NET Core SDK button
- When the file has downloaded, open it to start the installer
- Continue through the installer, keeping all of the default settings
- Verify that the installation was completed successfully
- Open the Terminal application again
- Type in
dotnet
, press Enter/Return, and verify that the proper results appear
If the dotnet
command returns the message in the image above, that means the .NET Core SDK has been installed!
Installing Mono and MonoGame
Next, install Mono and MonoGame. These will be necessary to run the game built throughout the course.
Installing Mono
First, install Mono.
- Go to the Mono download page, and make sure macOS is selected
- Click the Download Mono (Stable channel) button
- When the file is downloaded, open it to start the installer
- Continue through the installer, keeping all of the default settings
- Verify that the installation was completed successfully
After these steps, Mono should be installed.
Installing MonoGame
MonoGame is a framework built on top of Mono. Follow the steps below to install it.
- Open a terminal
- Copy and run the following commands, one after the other:
dotnet new --install MonoGame.Templates.CSharp
dotnet tool install --global dotnet-mgcb-editor
mgcb-editor --register
Once the commands complete, MonoGame should be installed.
Beyond
The rest of the environment setup should be platform independent. Refer back to the main Environment Setup guide to continue. By the end, it should be possible to:
- Open Visual Studio Code
- Open the ArcadeFlyer folder
- Open the "Run" pane from the left menu
- Click the "Play" button
- See an empty blue screen appear
If all of that works, that means the environment has been setup properly!