Error deploying .netcore 8 Web API to Google App Engine – No valid .NET Core runtime version found for the app or it is not a supported app

I am trying to deploy a .netcore 8 API to Google App Engine using this guide: https://cloud.google.com/appengine/docs/flexible/dotnet/runtime

I have update my project file to look as follows:

<PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
    <None Update="app.yaml">
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
</ItemGroup>

<ItemGroup>
    <PackageReference Include="Google.Cloud.AIPlatform.V1" Version="2.26.0" />
    <PackageReference Include="Google.Cloud.Diagnostics.AspNetCore" Version="4.4.0" />
    <PackageReference Include="Google.Cloud.Vision.V1" Version="3.6.0" />
    <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.6.0" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>

I have also added the app.yaml file with the following content:

runtime: aspnetcore
env: flex

runtime_config:
  operating_system: "ubuntu22"

Using the gcloud cli, I successfully authenticate and run the following command to deploy the app:

gcloud app deploy app.yaml

The upload seems successful, however the build breaks with the following error:

Step #1: No valid .NET Core runtime version found for the app or it is
not a supported app.

Full log:

Beginning deployment of service [default]…
#============================================================#
#= Uploading 1 file to Google Cloud Storage =#
#============================================================# File upload done. WARNING: .NET 3 and earlier versions will reach end of
support on 2024-07-10 for App Engine flexible environment. After
2024-07-10, you cannot deploy new or re-deploy existing applications
that use runtimes after their end of support date. We recommend that
you migrate to the latest supported version of .NET.

Updating service [default] (this may take several minutes)…done.
——————————————————– REMOTE BUILD OUTPUT ——————————————————–
starting build “050f4aa1-a057-4a88-91be-9c0006c111c3”

FETCHSOURCE BUILD Starting Step #0 – “fetcher” Step #0 – “fetcher”:
Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 – “fetcher”: Fetching manifest
gs://staging.nodex-labels.appspot.com/ae/0ae19b24-c5d6-4d37-b683-a12381489790/manifest.json.
Step #0 – “fetcher”: Processing 57 files. Step #0 – “fetcher”:
****************************************************** Step #0 – “fetcher”: Status: SUCCESS Step #0 – “fetcher”:
Started: 2024-04-25T08:52:51Z Step #0 – “fetcher”:
Completed: 2024-04-25T08:52:57Z Step #0 – “fetcher”:
Requested workers: 200 Step #0 – “fetcher”: Actual workers:
57 Step #0 – “fetcher”: Total files: 57 Step #0 – “fetcher”:
Total retries: 4 Step #0 – “fetcher”: GCS timeouts:
4 Step #0 – “fetcher”: MiB downloaded: 271.54 MiB Step #0 –
“fetcher”: MiB/s throughput: 48.67 MiB/s Step #0 – “fetcher”:
Time for manifest: 949.21 ms Step #0 – “fetcher”: Total time:
6.56 s Step #0 – “fetcher”: ****************************************************** Finished Step #0 – “fetcher” Starting Step #1 Step #1: Pulling image: gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5552a5efdaf278a2124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f
Step #1:
gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5552a5efdafg78a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f:
Pulling from gcp-runtimes/aspnetcorebuild Step #1: bd0de8be231c:
Pulling fs layer Step #1: 091745073ef1: Pulling fs layer Step #1:
355bf594d611: Pulling fs layer Step #1: 013d0752935b: Pulling fs layer
Step #1: 4c7d0d02eb09: Pulling fs layer Step #1: 013d0752935b: Waiting
Step #1: 4c7d0d02eb09: Waiting Step #1: 355bf594d611: Download
complete Step #1: 013d0752935b: Download complete Step #1:
4c7d0d02eb09: Verifying Checksum Step #1: 4c7d0d02eb09: Download
complete Step #1: 091745073ef1: Verifying Checksum Step #1:
091745073ef1: Download complete Step #1: bd0de8be231c: Verifying
Checksum Step #1: bd0de8be231c: Download complete Step #1:
bd0de8be231c: Pull complete Step #1: 091745073ef1: Pull complete Step
#1: 355bf594d611: Pull complete Step #1: 013d0752935b: Pull complete Step #1: 4c7d0d02eb09: Pull complete Step #1: Digest:
sha256:f5552a5efdaf278a3124ea10fd1c9636b03fc9f98f9e620cbd71279797576b3f
Step #1: Status: Downloaded newer image for
gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5352a5efdaf278a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f
Step #1:
gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5552a5efdaf278a3124ea10fd1c9336b09fc9f98f9e620cbd71279797576b3f
Step #1: No valid .NET Core runtime version found for the app or it is
not a supported app. Finished Step #1 ERROR ERROR: build step 1
“gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5552a5efdaf278a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f”
failed: step exited with non-zero status: 1
————————————————————————————————————————————- WARNING: .NET 3 and earlier versions will reach end of support on
2024-07-10 for App Engine flexible environment. After 2024-07-10, you
cannot deploy new or re-deploy existing applications that use runtimes
after their end of support date. We recommend that you migrate to the
latest supported version of .NET.

Updating service [default] (this may take several minutes)…failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build
050f4aa1-a057-4b88-91be-9c0006c9a9c3 status: FAILURE

Please help, what am I missing?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật