How do I deploy C# projects from my own system via the terminal?

656 views
Skip to first unread message

Neo42

unread,
Jun 8, 2017, 9:06:26 PM6/8/17
to Google App Engine

I'm using a mac.   Visual Studio for Mac - Community.  The google cloud extension isn't available to me.  I would rather not use a VM to develop.  So I'd like to develop locally and then run a command to publish.  I'm assuming I'll possibly need an app. yaml file and and index.yaml file.  

Jordan (Cloud Platform Support)

unread,
Jun 9, 2017, 1:49:22 PM6/9/17
to Google App Engine
You can deploy any custom runtime to the App Engine Flexible environment using a Dockerfile. It is recommended that you first start with the provided Quickstart Guide to running a C# project on App Engine. Once you have a working project, you can then add in your own C# application code.  

Neo42

unread,
Jun 9, 2017, 2:34:10 PM6/9/17
to Google App Engine
That is helpful.  I didn't realize there was a Tab in the documentation for doing things va command line instead of only through visual studio.

Neo42

unread,
Jun 9, 2017, 2:42:39 PM6/9/17
to Google App Engine
Also.  Let me see if I'm right in saying this:

Install google cloud sdk.  Done.

After building my aspnetcore app in visual studio, the primary steps needed afterwards are:

create an app.yaml file and place it in the same directory as the CSProj file.  The contents of the app.yaml file are:
runtime: aspnetcore
env: flex

run the following commands via terminal while in the same directory as the CSproj file and the App.yaml file

gcloud app create    
dotnet restore

dotnet publish -c Release

gcloud beta app deploy app.yaml 


How important is the following line?  I'm not sure I ran it.
gcloud app create    


I'm getting a error upon trying to deploy my app, but I don't know how to check the logs as it suggests.  ERROR: (gcloud.beta.app.deploy) Error Response: [2] Build failed; check build logs for details



On Friday, June 9, 2017 at 1:49:22 PM UTC-4, Jordan (Cloud Platform Support) wrote:

Neo42

unread,
Jun 9, 2017, 3:20:07 PM6/9/17
to Google App Engine
Step #0: No .deps.json file found for the app
Finished Step #0
ERROR

What is a deps.json?  Do I need a project.json file, like the sample?  How do I configure it?


Found build history.  And the log I guess.

I found it via this.  As you run the deploy it says this:

WARNING: Checking the status of the Appengine Flexible Environment API during Appengine Flexible deployments is currently in beta.

Beginning deployment of service [default]...

Building and pushing image for service [default]

Started cloud build [some_number].

To see logs in the Cloud Console: <the link>



Neo42

unread,
Jun 9, 2017, 4:18:53 PM6/9/17
to Google App Engine
ok.

I did a search on my computer for deps.json and it showed up in the build directories.  From where I was running the command, it looked familiar.  So...

I'm running deploy again after moving my App.yaml file to that subdirectory

gcloud beta app deploy ./bin/Release/netcoreapp1.1/publish/app.yaml


Note.  It's netcoreapp1.1 instead of 1.0.  

I'll let you know how it goes.  I'm running off a hotspot at the moment, so, this part takes forever.  

...

It's already farther than my other attempts.  Looking like it might be good.  I'll post back here again later.

Neo42

unread,
Jun 9, 2017, 4:29:58 PM6/9/17
to Google App Engine

I finally deployed my app!    ... it has some bugs with the cloud datastore stuff, but at least I can publish now. 
Reply all
Reply to author
Forward
0 new messages