A reference .NET application implementing an e-commerce website using a services-based architecture using .NET Aspire.
This version of eShop is based on .NET 9.
- Clone the eShop repository: https://github.com/jbogard/eshop
- Install & start Docker Desktop
- Install Visual Studio 2022 version 17.10 or newer.
- Select the following workloads:
ASP.NET and web developmentworkload..NET Aspire SDKcomponent inIndividual components.
- Select the following workloads:
Or
- Run the following commands in a Powershell & Terminal running as
Administratorto automatically configure your environment with the required tools to build and run this application. (Note: A restart is required and included in the script below.)
install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense -Force
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
get-WinGetConfiguration -file .\.configurations\vside.dsc.yaml | Invoke-WinGetConfiguration -AcceptConfigurationAgreementsOr
- From Dev Home go to
Machine Configuration -> Clone repositories. Enter the URL for this repository. In the confirmation screen look for the sectionConfiguration File Detectedand clickRun File.
- Install the latest .NET 9 SDK
Or
- Run the following commands in a Powershell & Terminal running as
Administratorto automatically configuration your environment with the required tools to build and run this application. (Note: A restart is required after running the script below.)
install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense -Force
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
get-WinGetConfiguration -file .\.configurations\vscode.dsc.yaml | Invoke-WinGetConfiguration -AcceptConfigurationAgreementsNote: These commands may require
sudo
- Optional: Install Visual Studio Code with C# Dev Kit
Note: When running on Mac with Apple Silicon (M series processor), Rosetta 2 for grpc-tools.
Warning
Remember to ensure that Docker is started
- (Windows only) Run the application from Visual Studio:
- Open the
eShop.Web.slnfile in Visual Studio - Ensure that
eShop.AppHost.csprojis your startup project - Hit Ctrl-F5 to launch Aspire
- Or run the application from your terminal:
dotnet run --project src/eShop.AppHost/eShop.AppHost.csprojthen look for lines like this in the console output in order to find the URL to open the Aspire dashboard:
Login to the dashboard at: http://localhost:19888/login?t=uniquelogincodeforyouYou may need to install ASP.NET Core HTTPS development certificates first, and then close all browser tabs. Learn more at https://aka.ms/aspnet/https-trust-dev-cert
The sample catalog data is defined in catalog.json. Those product names, descriptions, and brand names are fictional and were generated using GPT-35-Turbo, and the corresponding product images were generated using DALL·E 3.