I've been following along with this: https://www.youtube.com/watch?v=HYe6y1kBuGI&t=220s
However after it's reported a successful deployment with 'azd up' and I can see the various resources created in Azure, both the API and web project container apps fail to start and have the same message in the logs:
2024-01-23T12:14:26.223945758Z You must install or update .NET to run this application. 2024-01-23T12:14:26.223974311Z 2024-01-23T12:14:26.223978739Z App: /app/ecoDriverAnalytics.Web.dll 2024-01-23T12:14:26.223982316Z Architecture: x64 2024-01-23T12:14:26.223985552Z Framework: 'Microsoft.AspNetCore.App', version '8.0.0' (x64) 2024-01-23T12:14:26.223996533Z .NET location: /usr/share/dotnet/ 2024-01-23T12:14:26.223999578Z 2024-01-23T12:14:26.224002914Z No frameworks were found. 2024-01-23T12:14:26.224049512Z 2024-01-23T12:14:26.224054942Z Learn more: 2024-01-23T12:14:26.224079878Z https://aka.ms/dotnet/app-launch-failed 2024-01-23T12:14:26.224082994Z 2024-01-23T12:14:26.224086120Z To install missing framework, download: 2024-01-23T12:14:26.224097251Z https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=8.0.0&arch=x64&rid=linux-x64&os=debian.12
I'm a bit stumped by this, not seen other users having the same issue. I can see if I turn on debug output:
Building image 'azd-deploy-webfrontend-1706014618' with tags 'latest' on top of base image 'mcr.microsoft.com/dotnet/runtime:8.0'.
So I can't see why it wouldn't have the .NET runtime and yet that's the message I get.
I found this is a problem with the current aspire preview using a preview version of the .net sdk (8.0.200-preview.23624.5).
If I add a global.json file in the root of my solution with:
That sorts it for now, after azd deploy my containers have started.
Issue link:
https://github.com/dotnet/aspire/issues/1737