Prerequisites
Before running the application, ensure you have:- Completed Development Setup
- Configured your database connection
- Applied database migrations
Building the Application
TechCore requires building both the .NET application and Tailwind CSS assets.Building CSS Assets
The project uses Tailwind CSS 4.2.1 with DaisyUI 5.5.19 for styling. CSS is built automatically during the .NET build process via a pre-build target. To manually build CSS:Building the .NET Application
The build process automatically triggers
npm run css:build before compilation, as defined in the Tailwind target in TechCore.csproj.Running Database Migrations
Before running the application for the first time, create the database:Apply migrations
Creating New Migrations
When you modify entity models, create a new migration:Running the Application
Using .NET CLI
Run the application
- Build the project (including CSS assets)
- Start the Kestrel web server
- Display the URLs where the app is listening
Using Visual Studio
Set startup project
Ensure TechCore is set as the startup project (right-click project > Set as Startup Project).
Using Visual Studio Code
Accessing the Application
Once running, access TechCore at:- HTTPS:
https://localhost:5001 - HTTP:
http://localhost:5000
The default route is configured as
{controller=Home}/{action=Index}/{id?}, so navigating to the root URL will load the Home controller’s Index action.Development vs Production Mode
The application behavior changes based on the environment:Development Mode
Program.cs:22-27
- Detailed error pages are shown
- HSTS is disabled
appsettings.Development.jsonoverrides are applied
Production Mode
In Production:- Errors are handled by the
/Home/Errorendpoint - HSTS (HTTP Strict Transport Security) is enabled with a 30-day max-age
- Only
appsettings.jsonis used
Hot Reload
.NET 10.0 supports hot reload for rapid development:- Run the application
- Watch for file changes
- Automatically rebuild and refresh when you save changes
Troubleshooting
Port Already in Use
If ports 5000 or 5001 are already in use, you can specify different ports:CSS Not Loading
If styles are not appearing:-
Verify npm packages are installed:
-
Manually build CSS:
-
Check that
wwwroot/css/styles.csswas generated
Database Connection Failed
If you see database connection errors:- Verify SQL Server is running
- Check your connection string in
appsettings.jsonor user secrets - Ensure the database exists:
Entity Framework Tools Not Found
Ifdotnet ef commands fail:
Development Workflow
Recommended workflow for local development:Next Steps
- Review the Architecture documentation
- Explore the Data Access Layer
- Learn about Entity Models