Developer Docs

C# Local Environment Setup


The steps in this article are to be carried out after an app has been created and cloned to your local environment.

Software Downloads

Required Software


By default, an app made with Codebots will use a PostgreSQL database. If your application was created using the Generate tool, and you specified a database other than the default (Postgres), use the database provider you selected instead.

If you are setting up a new database provider, all Codebots’ applications default to username: user and password: pass when trying to connect.

If you are using an existing database provider, you can configure your database connection by altering the connection string in serverside/src/appsettings.Development.xml.

You do not need to create the database for the server at this stage - it will be created later.

First time setup

It is important to note that if these steps are being done on Linux, you should not sudo these commands, or otherwise there shall be file ownership issues later.

  1. First the client-side needs to have its packages installed; navigate to the clientside directory and run npm install -g yarn followed by yarn install.
  2. Navigate to serverside/src/ and run dotnet build.
  3. An initial database migration must be created; navigate to serverside/src and run dotnet ef migrations add InitialMigration.
  4. Now the migration needs to be applied to the database; still in the serverside/src directory, run dotnet ef database update. This will create the database and all of the tables.
  5. At this point the server should be ready to run; still in the serverside/src directory, run dotnet run.
  6. You can now access the server by navigating to http://localhost:5000/ in your web browser.



By default an sln file is not created, but this can be fixed from the dotnet command line.

Now the sln file can be opened in an IDE such as Visual Studio or Rider.

Was this article helpful?

Thanks for your feedback!

If you would like to tell us more, please click on the link below to send us a message with more details.







On this page

New to Codebots?

We know our software can be complicated, so we are always happy to have a chat if you have any questions.