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?