简体   繁体   中英

I can't publish a App Engine application to GCloud using the Google Cloud Platform tools in Visual Studio 2019

I just moved my application to use ASP.Net on.Net Core 3.1. I previously was using NodeJS and Express. I installed the Google Cloud Platform tools for Visual Studio, generated the app.yaml and Dockerfile using the right click menu on my project, modified the app.yaml to what I would assume is a valid configuration, and attempted to publish it. I selected App Engine Flex, selected my project, and I got a "The selected GCP project needs services to be enabled before you can deploy. Enable the services" message. Clicking on Enable the services (which looks like a link) does not do anything. This is preventing be from publishing my app, which is kind of annoying.

Any help would be greatly appreciated:)

app.yaml

service: api
runtime: custom
env: flex
env_variables:
    ASPNETCORE_ENVIROMENT: "production"
instance_class: F2
automatic_scaling:
    min_idle_instances: 0
    max_idle_instances: 2
    min_pending_latency: 15ms
    max_pending_latency: 100ms

Dockerfile

FROM gcr.io/google-appengine/aspnetcore:3.1
COPY . /app
WORKDIR /app
ENTRYPOINT ["dotnet", "Project Phoenix Game Services.dll"]

启用 App Engine 管理 API。

This happened to me also, when trying to publish a .NET 6 Web API. In order to solve it this is what I did:

  1. Went to my dashboard https://console.cloud.google.com/
  2. Searched for "App Engine Admin API", using the search bar on the top
  3. Enabled it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM