Skip to main content

Prerequisites

Before installing ESP Santa Fe de Antioquia, ensure your development environment meets the following requirements:
1

.NET Core 3.1 SDK

Download and install the .NET Core 3.1 SDK for your operating system.Verify the installation:
dotnet --version
Expected output: 3.1.x
2

SQL Server

Install SQL Server 2017 or later. You can use:
  • SQL Server Express (free)
  • SQL Server Developer Edition (free)
  • SQL Server Standard/Enterprise
Or use SQL Server on Docker:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrong@Passw0rd" \
  -p 1433:1433 --name sqlserver \
  -d mcr.microsoft.com/mssql/server:2019-latest
3

Development Tools

Install one of the following IDEs:

Clone the Repository

Clone the project from GitHub:
git clone https://github.com/JhotaMS/empsantafedeantioquia.gov.co.git
cd empsantafedeantioquia.gov.co

Install Dependencies

The project uses several NuGet packages that need to be restored:
cd src/prjESPSantaFeAnt
dotnet restore

Key Dependencies

The project includes the following major packages:
PackageVersionPurpose
Microsoft.EntityFrameworkCore.SqlServer3.1.9SQL Server database provider
Microsoft.AspNetCore.Identity.UI3.1.9ASP.NET Core Identity authentication
AutoMapper.Extensions.Microsoft.DependencyInjection8.1.0Object mapping
SendGrid9.21.0Email service integration
X.PagedList.Mvc.Core8.0.7Pagination support
All dependencies are defined in src/prjESPSantaFeAnt/prjESPSantaFeAnt.csproj and will be automatically restored.

Database Setup

1

Create the Database

Create a new database in SQL Server named BDESPSantaFeAnt:
CREATE DATABASE BDESPSantaFeAnt;
2

Update Connection String

Edit appsettings.json to configure your database connection:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=YOUR_SERVER;Database=BDESPSantaFeAnt;Trusted_Connection=True;MultipleActiveResultSets=true"
  }
}
Replace YOUR_SERVER with your SQL Server instance name (e.g., localhost, .\SQLEXPRESS, or (localdb)\mssqllocaldb).
3

Run Migrations

Apply Entity Framework Core migrations to create the database schema:
dotnet ef database update
This creates all required tables including:
  • ASP.NET Identity tables (Users, Roles, etc.)
  • Categories, Products, Employees
  • Documents, Brigades, PQRSD
  • BiddingParticipants and related entities
Ensure SQL Server is running before executing migrations. The migration file 20210927150752_CreandoBD.cs contains the initial database schema.

Build the Application

Build the solution to verify everything is set up correctly:
dotnet build
Expected output should show:
Build succeeded.
    0 Warning(s)
    0 Error(s)

Run the Application

Start the development server:
dotnet run
The application will start on:
  • HTTPS: https://localhost:5001
  • HTTP: http://localhost:5000
The first run may take longer as the application compiles and initializes the database.

Verify Installation

Once the application is running:
  1. Navigate to https://localhost:5001 in your browser
  2. You should see the ESP Santa Fe de Antioquia homepage
  3. Try accessing /Identity/Account/Register to verify Identity is working
  4. Check the console for any startup errors

Next Steps

Configuration

Configure authentication, email, and file uploads

Architecture Overview

Learn about the application architecture

Troubleshooting

Database Connection Issues

If you see errors connecting to SQL Server:
  1. Verify SQL Server is running
  2. Check your connection string format
  3. For Windows Authentication, use Trusted_Connection=True
  4. For SQL Authentication, use User Id=sa;Password=YourPassword

Port Already in Use

If ports 5000/5001 are in use, configure custom ports in Program.cs:prjESPSantaFeAnt:24:
webBuilder.UseUrls("http://localhost:5024", "https://localhost:5025");

Missing Dependencies

If build fails with missing package errors:
dotnet clean
dotnet restore
dotnet build

Build docs developers (and LLMs) love