C#Bot Setting Up Your Development Environment: Windows
This section will guide you through the installation of C#Bots’ core prerequisite dependencies:
- .NET 5 SDK
- Node Js
- dotnet-ef 5
The following steps will walk you through the process of setting up your development environment for Windows 10. The approximate setup time is 5-10 minutes.
.NET 5 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 5 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 Windows Installer appropriate for your machine i.e. x64 for 64bit machines or x86 for 32bit machines.
Following the link should start the .Net Windows Installer downloading through your web-browser. 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 5.0 SDK should now be installed on your machine.
To install Node.js, go to the Node.js download page. You should see a page that looks like the image below. Select
Current tab (shown in red box) then the
Windows Installer option (shown in the red box). This will start the installer downloading in your web-broswer.
Launch the installer and follow the prompts.
Use the default options throughout the installation process (just keep clicking ‘next’).
Node.js should now be 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 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 be
pass. If you wish to choose a different superuser password, there are steps in Running C#Bot in the
First Time Setup steps section for configuring the database connection string for a user configured password.
Keep going with the default 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-based application and will launch in your web browser. You can use this tool to modify database tables and configurations.
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.
To install it, open an elevated Powershell and run the below command.
dotnet tool install --global dotnet-ef --version 5.0
You can verify the installation by running the following command.