Prerequisites
Before installing SupermarketWEB, ensure you have the following installed on your system:.NET 8.0 SDK
Download from dotnet.microsoft.com
SQL Server
SQL Server LocalDB or SQL Server Express (included with Visual Studio)
SupermarketWEB targets .NET 8.0 with C# nullable reference types enabled. Make sure you have the correct SDK version installed.
Verify Prerequisites
Check your .NET installation:Installation Steps
Restore NuGet Packages
Restore the required NuGet packages for the project:This will install the following dependencies:
- Microsoft.EntityFrameworkCore (v8.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (v8.0.10)
Configure Database Connection
The default configuration uses SQL Server LocalDB. If you need to change the connection string, edit See the Configuration Guide for detailed database setup options.
appsettings.json:Build the Application
Build the project to ensure everything compiles correctly:You should see a successful build with no errors.
Run the Application
Start the development server:The application will start and display the URLs it’s listening on:
Verify Installation
To verify your installation is working correctly:- Check the home page loads - You should see the main dashboard
- Test authentication - Navigate to
/Account/Loginto verify the login page loads - Check database connectivity - Try accessing any of the management pages (Categories, Products, Customers, etc.)
Project Structure
After installation, you’ll have the following structure:Troubleshooting
Database Connection Issues
If you encounter database connection errors:- Verify SQL Server LocalDB is installed
- Check the connection string in
appsettings.json - Ensure the database was created with
dotnet ef database update
Port Already in Use
If ports 5000 or 5001 are already in use:- Modify the URLs in
Properties/launchSettings.json - Or let the system assign random ports by removing the URL configuration
Package Restore Failures
If package restore fails:- Clear the NuGet cache:
dotnet nuget locals all --clear - Try restoring again:
dotnet restore - Check your internet connection