Jay
Jay

Reputation: 5084

Deploying ASP.NET Core App to Google App Engine using Mac Visual Studio?

I am running Visual Studio for Mac and I am truing to deploy my ASP.NET Core App to my Google App Engine project. I followed the steps described in this official guide but I got stuck in the "Install Cloud Tools for Visual Studio" step as there's no extension for Visual Studio Mac version.

I also came across the Cloud SDK for Mac and now I am confused which way to go. What's the relationship between these two guides and what's the right way of deploying a VS ASP project to App Engine on a Mac?

EDIT

app.yaml file contains:

runtime: aspnetcore env: flex

Upvotes: 1

Views: 1168

Answers (3)

Tyler Gillson
Tyler Gillson

Reputation: 31

Steps to deploy to Google App Engine:

  1. Create a new ASP .Net project in Visual Studio
  2. Build your project.
  3. Install Google Cloud SDK: https://cloud.google.com/sdk/.
  4. Run the following commands via terminal while in the same directory as your VS solution file: gcloud app create dotnet restore dotnet publish -c Debug
  5. Create an app.yaml file as follows and place it in the “publish” directory.

    The contents of the app.yaml file are:

    runtime: aspnetcore env: flex

    The path to the publish directory will be as follows: ".../my_vs_project/bin/Debug/netcoreapp2.0/publish"

  6. Run the following command via terminal while in the same directory as app.yaml file:

    gcloud app deploy

Upvotes: 3

Dan Cornilescu
Dan Cornilescu

Reputation: 39824

Note: the comment on another answer indicates that the confusion comes from also looking at the Google App Engine .NET Flexible Environment Documentation.

In general GAE is higher level cloud offering which can take care of some of the maintenance activities a plain, general-purpose VM infra like GCE would require (for example scalability), so you can focus more on your app itself instead.

But the choice of using GAE or GCE is really yours - it depends on how you want to build and use your app. And maybe on how well these are supported/integrated with your tools of choice (VS in your case).

Upvotes: 0

mohi
mohi

Reputation: 86

Well, the SDK is a lower level tool to use and hence more cumbersome. Basically what "Cloud Tools for Visual Studio" does is hiding the complexities of using SDK. Since there is no GCP extention for VS Mac looks like that's the only choice that you have so you need to do SDK commands like " gcloud app create" and "gcloud app deploy" to deploy your project to GCP. I hope this is helpful.

Upvotes: 1

Related Questions