The Granite State Hacker

Getting Started with .NET Aspire

At .NET Conf 2023, Microsoft announced a new stack set on top of the (also new) .NET 8 (LTS). During this presentation, I dig into what .NET Aspire is made of, and how to build cloud ready apps on it. It may still be in preview for now, something tells me it will become a .NET staple eventually.

During my presentation at Granite State .NET (NH) Developer’s Meetup on April 18th, I recorded the presentation. During the presentation, I unintentionally updated my toolset in the middle of the demo, and pried out the demo demons.

Catch the presentation on YouTube here:

The error that came up during the publish operation was this:

Error generating project artifacts: configuring ingress for resource cache: binding for does not specify a container port, ensure WithServiceBinding for this resource specifies a hostPort value ErrorPublish profile creation failed. Unable to store profile

Here’s the related GitHub issue:
[WebToolsE2E][Aspire] For Aspire Starter App projects with redis checked, an error occurs when running ‘azd init’. · Issue #3624 · Azure/azure-dev (github.com)

The solution was to also update AZ and AZD cli tools.

C:\Program Files\Microsoft Visual Studio\2022\Enterprise>winget upgrade Microsoft.Azd
Found Azure Developer CLI [Microsoft.Azd] Version 1.8.100
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/Azure/azure-dev/releases/download/azure-dev-cli_1.8.0/azd-windows-amd64.msi
██████████████████████████████ 9.66 MB / 9.66 MB
Successfully verified installer hash
Starting package install…
Successfully installed

After updating the tools, publishing proceeded as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *