1

When I try to publish an ASP.NET Core 2.1 Web Application to Google Cloud Platform App Engine I get the error gcloud crashed (error): bad character range.

I publish with the GCP Visual Studio 2017 extension and I get the above error.

I publish from the cmd with an app.yaml in my project and I get the above error.

In order to deploy the ASP.NET Core 2.1 web application to Google Cloud App Engine I added an app.yaml file with the following contents:

runtime: aspnetcore
env: flex

I did the following:

Added app.yaml with

runtime: aspnetcore
env: flex

Added it to csproj

 <ItemGroup>
    <None Include="app.yaml" CopyToOutputDirectory="Always" />
  </ItemGroup>

And executed the command

gcloud beta app deploy ./bin/release/netcoreapp2.1/publish/app.yaml

However I got the error: gcloud crashed (error): bad character range

Anyone know what I am doing wrong?

I follow the following guide and still get the same error when I try method 1, 2 and 3: https://cloudplatform.googleblog.com/2017/10/4-ways-you-can-deploy-an-ASP.NET-Core-app-to-GCP.html

Brian
  • 129
  • 1
  • 9

2 Answers2

1

There is a public issue for this. It is a known issue with 213.0.0. Please try using the newest version, or version 212 if that still doesn't work.

  • I am working with 215.0.0 now. I will try some older versions to see if they give the same error. – Brian Sep 11 '18 at 07:56
0

WORKING

I got it working with the following.

I downloaded GCP SDK 174.0.0 and then I tried it with the GCP Visual Studio extension and it showed the error:

{
    "error": {
    "code": 403,
    "message": "SSL is required to perform this operation.",
    "status": "PERMISSION_DENIED"
  }
}

So I turned on SSL 3.0 in my internet options and then it worked.

You need GCP SDK 174.0.0 or higher to use the GCP Visual Studio extension.

Brian
  • 129
  • 1
  • 9