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.
- NET Core 3.1 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 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:
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.
The installer shouldn’t require any further input after selecting the Install option.
The .Net Core 3.0 SDK should now be installed on your windows machine.
To install Node.js, go to the Node.js download page. You should see a page that look like the image below.
Currenttab (shown in red box)
- Select the
Windows Installer(shown in the red box)
This will start the installer downloading in your web-broswer.
Launch the installer and follow the prompt.
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 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.
After launching the downloaded installer .exe, 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 (including leaving the default port set to 5432) 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 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.
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.