CloudShell icon indicating copy to clipboard operation
CloudShell copied to clipboard

Add .NET 8 SDK to Cloud Shell image

Open alexweininger opened this issue 8 months ago • 0 comments

To Reproduce

azd init -t cawams/eshop
azd up

Observed Behavior

azd up fails to package the dotnet app because it wants .net8, but only .net7 is available in cloud shell.

Packaging services (azd package)

  (x) Failed: Packaging service web

ERROR: error executing step command 'package --all': failed packaging service 'web': dotnet publish on project '/home/alex/eShop-afb9/eShop/eShop.csproj' failed: exit code: 1, stdout: MSBuild version 17.7.4+3ebbd7c49 for .NET
  Determining projects to restore...
/usr/share/dotnet/sdk/7.0.408/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(160,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. Download the .NET SDK from https://aka.ms/dotnet/download [/home/alex/eShop-afb9/eShop/eShop.csproj]
, stderr: 

Additional context

Output of dotnet list runtimes and dotnet list sdks showing missing dotnet 8 sdk

alex [ ~/eShop-afb9 ]$ dotnet --list-runtimes
Microsoft.AspNetCore.App 7.0.18 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.18 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
alex [ ~/eShop-afb9 ]$ dotnet --list-sdks
7.0.408 [/usr/share/dotnet/sdk]

alexweininger avatar Jun 14 '24 18:06 alexweininger