Skip to content

Unsettling/aspire-test

Repository files navigation

Demo for minimum Aspire project

Introduction

How to create a minimum Aspire project that uses Service Bus and Event Hub emulators with a Function App.

Setup

Assuming the dotnet CLI is already installed.

  mkdir test; cd test
  dotnet new install Aspire.ProjectTemplates
  dotnet new aspire-starter
  dotnet new gitignore
  dotnet sln migrate
  dotnet dev-certs https --trust
  dotnet run --project .\test.AppHost\test.AppHost.csproj

Add Integrations

Assuming the Aspire CLI is already installed.

  aspire update --self
  aspire update
  aspire add azure-servicebus
  aspire add azure-eventhubs

Update AppHost

Update the AppHost.cs to add Event Hubs and Service Bus emulators.

Add Function App

winget install Microsoft.Azure.FunctionsCoreTools
aspire add azure-functions
mkdir test.Function; cd .\test.Function\
func new --template "ServiceBusQueueTrigger" --name "TestServiceBusQueueTrigger" --worker-runtime dotnet-isolated
cd ..; dotnet sln add .\test.Function\test_Function.csproj
dotnet reference add .\test.Function\test_Function.csproj --project .\test.AppHost\test.AppHost.csproj

About

Test Aspire

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published