Techies.

C#Bot Setting Up Your Development Environment: Windows

Setting up your C#Bot development environment for Windows 10.


This section will guide you through the installation of C#Bots’ core prerequisite dependencies i.e.

  1. NET Core 3.1 SDK
  2. Node Js version 12.12.0
  3. PostgreSQL version 10.6
  4. dotnet-ef 3.0

The following steps will walk you through the process of setting up your development environment for Windows 10

Approximate setup time is 5-10 minutes.

.NET Core 3.1 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.1 SDK, go to the Microsoft .Net Core Download to download the SDK. You should reach a page that looks like the image below:

DownloadNetCore3.0Image

Select the .Net Core Windows Installer appropriate for your machine i.e. x64 for 64bit machines or x86 for 32bit machines.

Following the link should start the .Net Core Windows Installer downloading through your web-broswer. Once the download has completed, run the .exe and follow the prompts.

DownloadNetCore3.0Image

The installer shouldn’t require any further input after selecting the Install option.

DownloadNetCore3.0Image

The .Net Core 3.0 SDK should now be installed on your windows machine.

Node.js

To install Node.js, go to the Node.js download page. You should see a page that look like the image below.

  • Select Current tab (shown in red box)
  • Select the Windows Installer (shown in the red box)

This will start the installer downloading in your web-broswer.

DownloadNetCore2.2Image

Launch the installer and follow the prompt.

DownloadNetCore2.2Image

Use the default options throughout the installation process (just keep clicking ‘next’).

DownloadNetCore2.2Image

Node.js is now installed.

PostgreSQL

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 the PostgreSQL Version 10.10 appropriate for your windows machine (64 or 32). The installer should start downloading in your web-browser once you have clicked the appropriate link.

DownloadNetCore2.2Image

After launching the downloaded installer .exe, you should see a setup application like the one in the image below.

DownloadNetCore2.2Image

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.

DownloadNetCore2.2Image

Keep going with the defualt settings (including leaving the default port set to 5432) until the last screen is reached. Uncheck Launch Stack Builder on Exit? option and press Finish.

DownloadNetCore2.2Image

PostgreSQL should now be installed on your machine.

pgAdmin

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 the start menu for pgAdmin. pgAdmin is a browser application and will launch in your default browser. You can modify database tables and configurations through this tool.

pgAdminImage

dotnet -ef

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 an elevated powershell and run the command.

dotnet tool install --global dotnet-ef --version 3.0

You can verify the installation by running the command below.

dotnet-ef -v

Last updated: 28 August 2020


Related articles