Prerequisites
Before you begin, ensure you have the following installed on your development machine.Required Software
.NET 10 SDK
Download and install the .NET 10 SDK from dotnet.microsoft.com.Verify installation:Expected output:
10.0.x or higherGit
Install Git for version control:
- Windows: Download from git-scm.com
- macOS:
brew install gitor download from git-scm.com - Linux:
sudo apt-get install git(Debian/Ubuntu) orsudo yum install git(Red Hat/CentOS)
Clone the Repository
Clone the project from GitHub:Project Structure
After cloning, you’ll see the following structure:Restore Dependencies
Restore NuGet packages:Microsoft.AspNetCore.OpenApi- OpenAPI specification supportScalar.AspNetCore- API documentation UI
Build the Project
Compile the project to verify everything is set up correctly:Run the API
Start the development server:- HTTPS:
https://localhost:5001 - HTTP:
http://localhost:5000
The first run may take longer as NuGet packages are restored and the project is compiled.
Access the API Documentation
Open your browser and navigate to:- All available endpoints
- Request/response schemas
- Interactive testing
- Code generation for multiple languages
Configuration
appsettings.json
The default configuration file:appsettings.json
appsettings.Development.json
Development-specific settings:appsettings.Development.json
launchSettings.json
Defines how the application runs:Properties/launchSettings.json
Custom Port Configuration
If the default ports are in use, specify custom ports:Option 1: Command Line
Option 2: Environment Variable
Linux/macOS:Option 3: appsettings.json
SSL Certificate Setup
For HTTPS in development, trust the .NET development certificate:https://localhost:5001.
Certificate issues on macOS/Linux
Certificate issues on macOS/Linux
If you encounter certificate trust issues:macOS:Linux:On Linux, you may need to manually trust the certificate in your browser.
IDE-Specific Setup
Visual Studio 2022
- Open
preliminarServicios.sln - Set the startup project to
preliminarServicios - Press F5 to run with debugging or Ctrl+F5 without debugging
- The browser will automatically open to the Scalar documentation
Visual Studio Code
- Open the folder:
File > Open Folder > ServiciosWebPreliminar - Install the C# extension if prompted
- Open the terminal:
Ctrl+` - Run:
dotnet run - Open browser to
https://localhost:5001/scalar/v1
- Press F5 or click Run > Start Debugging
- Select C# as the environment
- VS Code will generate
.vscode/launch.jsonand.vscode/tasks.json
JetBrains Rider
- Open
preliminarServicios.sln - Click the Run button or press Shift+F10
- The browser will automatically open to the API documentation
Testing the Setup
Verify your setup by making a test API call:Hot Reload
.NET 10 supports hot reload for faster development:.cs files, the application automatically reloads without restarting.
Common Issues
Port already in use
Port already in use
Error:
System.IO.IOException: Failed to bind to address https://127.0.0.1:5001Solution: Use a different port:SSL certificate not trusted
SSL certificate not trusted
Error: Browser shows “Your connection is not private”Solution: Trust the development certificate:
'dotnet' command not found
'dotnet' command not found
Error:
bash: dotnet: command not foundSolution:- Ensure .NET 10 SDK is installed
- Verify it’s in your PATH
- Restart your terminal
Build errors after cloning
Build errors after cloning
Error: Various build errorsSolution: Restore packages and clean build:
Next Steps
Quickstart
Make your first API calls
Development Guide
Learn how to extend the API
Architecture
Understand the project structure
API Reference
Explore all endpoints