Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

eShop

> 编程语言
Open source

A reference .NET application implementing an eCommerce site

10.7K stars0 likes1 views
WebsiteGitHub

About

A reference .NET application implementing an eCommerce site

eShop Reference Application - "AdventureWorks"

A reference .NET application implementing an e-commerce website using a services-based architecture with Aspire.

Getting Started

This version of eShop is based on .NET 10.

Previous eShop versions:

  • .NET 8

Prerequisites

  1. Install a .NET 10 SDK that satisfies global.json.

  2. Install the Aspire CLI and verify that it is available:

    bash
    aspire --version
  3. Install and start an OCI-compatible container runtime. Docker Desktop is the recommended default. Podman is also supported; follow the Aspire prerequisites to configure it.

  4. Clone the repository:

    bash
    git clone https://github.com/dotnet/eShop.git
    cd eShop

No separate Aspire workload or Visual Studio component is required; the AppHost SDK and hosting integrations are referenced by the projects in this repository.

Optional IDE setup

  • Visual Studio with the ASP.NET and web development workload.
  • Visual Studio Code with C# Dev Kit and the Aspire extension.
  • The .NET MAUI workload if you want to run the client apps.

Running the solution

[!WARNING] Ensure that your container runtime is running before starting eShop.

From the terminal

From the repository root, run:

bash
aspire run

The root aspire.config.json selects src/eShop.AppHost/eShop.AppHost.csproj, avoiding ambiguity with the test AppHosts in the repository. When startup completes, the CLI prints a dashboard URL similar to:

Dashboard: https://localhost:<port>/login?t=<token>

Press Ctrl+C to stop the AppHost. See the aspire run command for additional options.

To run the AppHost in the background instead:

bash
aspire start
aspire ps

When you are finished, run aspire stop. See the aspire start command for details.

From Visual Studio

  1. Open eShop.Web.slnf.
  2. Set src/eShop.AppHost/eShop.AppHost.csproj as the startup project.
  3. Press Ctrl+F5 to start eShop and open the Aspire dashboard.

Running tests

Run the server tests:

powershell
dotnet test --solution eShop.Web.slnf

Run the Playwright browser journeys. Playwright starts the AppHost automatically, so ensure your container runtime is running first.

powershell
npm ci
npx playwright install chromium
npm run test:e2e

Optional: AI Chatbot with Microsoft Foundry

This option provisions a Microsoft Foundry resource during local development, so first authenticate to Azure and configure the subscription and location:

powershell
az login
aspire secret set "Azure:SubscriptionId" "<subscription-id>"
aspire secret set "Azure:Location" "eastus"

Then enable Foundry and start eShop:

powershell
$env:UseFoundry = "true"
aspire run

Aspire provisions the gpt-4.1-mini and text-embedding-3-small deployments and injects their connection information into the consuming projects. The Foundry hosting integration currently uses a preview package. See local Azure provisioning and the Microsoft Foundry hosting integration for details.

Deploy to Azure Container Apps

The AppHost is already configured with an Azure Container Apps environment, so the Aspire CLI can deploy directly from the application model. See the Aspire Azure Container Apps deployment guide for details.

[!WARNING] This sample deploys PostgreSQL, Redis, and RabbitMQ as containers in Azure Container Apps. This configuration is intended for evaluation and demonstrations, not production data.

Prerequisites:

  • The prerequisites listed above, including a running container runtime.
  • The Azure CLI, an active Azure subscription, and permission to create resources.

Sign in, optionally preview the deployment pipeline, and deploy:

bash
az login
aspire deploy --list-steps
aspire deploy

For local interactive use, aspire deploy prompts for missing Azure settings. For non-interactive use, provide them explicitly:

powershell
$env:Azure__SubscriptionId = "<subscription-id>"
$env:Azure__Location = "eastus"
$env:Azure__ResourceGroup = "rg-eshop-demo"
aspire deploy --non-interactive

Use aspire publish when you need deployment artifacts for inspection or another deployment tool. Running it first is not required: aspire deploy invokes the deployment pipeline and its dependencies directly rather than consuming an earlier publish output.

When you no longer need the deployment, run aspire destroy. This deletes the entire configured resource group, including resources that Aspire did not create, so review the target carefully before confirming.

Contributing

For more information on contributing to this repo, read the contribution documentation and the Code of Conduct.

Sample data

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.

eShop on Azure

For a version of this app configured for deployment on Azure, please view the eShop on Azure repo.

Issues· 124 open

View all issuesOpen on GitHub
  • #400

    Tracking message-id and delivertag in Rabbit EventBus implementation

    Updated Sep 27, 2026
  • #161

    Shouldn't ResilentTransaction class recreate DbContext on retry?

    Updated Sep 27, 2026
  • #26

    Clean up csproj files

    good first issueUpdated Sep 26, 2026
  • #989

    Update to latest Asp.Versioning package versions

    Updated Sep 17, 2026
  • #1017

    Aspire deployment skill recommends duplicate restore and JavaScript install/build work

    Updated Aug 27, 2026
  • #1015

    [dnceng-bot] Branch `eShop/main` can't be mirrored to Azdo fast forward branch

    Updated Aug 21, 2026
  • #1013

    [dnceng-bot] Branch `eShop/main` can't be mirrored to Azdo fast forward branch

    Updated Aug 18, 2026
  • #27

    Add items to cart without logging in

    good first issueUpdated Aug 6, 2026
  • #198

    Apple ARM Processors Require Rosetta 2 to Build for gRPC Build Tools Support

    questionUpdated Jul 29, 2026
  • #1005

    OpenAI, .net 10, database, demo?

    Updated Jul 15, 2026

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言