C#Bot Setting Up Your Development Environment: Mac
By Mikaela Robertson and Thomas Williams 26 February 2020 Techies
Setting up your C#Bot development environment for macOS.
This section will guide you through the installation of C#Bots' core prerequisite dependencies i.e.
- NET Core 3.0 SDk
- Node Js version 12.12.0
- PostgreSQL version 10.6
- dotnet-ef 3.0
The following steps will walk you through the process of setting up your development environment for Mac
Approximate setup time is 5-10 minutes.
.NET Core 3.0 SDK
.Net Core SDK is a Software Development Kit for building and developing C# applications like those written by C#Bot.
To install the .Net Core 3.0 SKD, go to the Microsoft .Net Core Download to download the SDK. You should reach a page that looks like the image below:
Select the .Net Core Installer for macOS.
Following the link should start the .Net Core Windows Installer downloading through your web-browser. Once the download has completed, run the .pkg and follow the prompts.
The installer shouldn't require any further input after selecting Continue.
The .Net Core 3.0 SDK should now be installed on your mac machine.
To install Node.js, go to the Node.js download page. You should see a page that look like the image below. Select the mocOS Installer (shown in the red box) to start the installer download in your web-browser.
Launch the installer and follow the prompts.
Use the default options throughout the installation process (just keep clicking 'next').
Node.js is now installed.
To install PostgreSQL, go to the enterprisedb postgresql download page. You should see a table on the page that looks like the one shown below. Select PostgreSQL Version 10.10 for Mac OS X. The installer should start downloading in your web-browser once you have clicked the appropriate link.
After launching the downloaded installer, you should see a setup application like the one in the image below.
Use the default options for the setup (just keep clicking next), until you reach the screen where the password for the superuser is set.
Set the password for the superuser to
pass. If you wish to choose a different superuser password, there are steps in Running CsharpBot in the
First Time Setup steps for configuring the database connection string to for a user configured password.
Keep going with the defualt settings until the last screen is reached. Uncheck
Launch Stack Builder on Exit? option and press
PostgreSQL should now be installed on your machine.
pgAdmin is a useful database explorer that works with PostgreSQL. It comes installed with postgreSQL in the enterprisedb package installed in the above step.
To access, search your applications for
pgAdmin. pgAdmin is a browser application and will launch in your default browser. You can modify database tables and configurations through this tool.
dotnet-ef is a package of Entity Framework Core tools for the .NET command line. It is used to create and apply database migrations after making model changes.
Open bash and run the command.
dotnet tool install --global dotnet-ef --version 3.0
You can verify the installation by running the command below.