GoogleCloudPlatform / google-cloud-visualstudio

Google Cloud Tools for Visual Studio
https://cloud.google.com/tools/visual-studio/docs/
Apache License 2.0
87 stars 50 forks source link

When I try to launch a .NET core app with a runtime not supported by App Engine Flex, the error message is cryptic. #847

Open SurferJeffAtGoogle opened 6 years ago

SurferJeffAtGoogle commented 6 years ago

publishfailed

Microsoft Visual Studio Community 2017 
Version 15.4.4
VisualStudio.15.Release/15.4.4+27004.2009
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Community

Visual Basic 2017   00369-60000-00001-AA909
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA909
Microsoft Visual C# 2017

Application Insights Tools for Visual Studio Package   8.9.00809.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30925.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.50921.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30915.0
Azure App Service Tools v3.0.0

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DeployToGae Extension   1.0
DeployToGae Visual Studio Extension Detailed Info

JavaScript Language Service   2.0
JavaScript Language Service

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager   4.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

TypeScript   2.3.5.0
TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
PS > gcloud --version
Google Cloud SDK 180.0.0
beta 2017.09.15
bq 2.0.27
core 2017.11.10
gcloud
gsutil 4.28
SurferJeffAtGoogle commented 6 years ago

Here's the build log:

Publishing WebApplication2 to Compute Engine.
dotnet publish -o "C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm" -c Release
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  WebApplication2 -> C:\Users\DPE Admin\source\repos\WebApplication2\WebApplication2\bin\Release\netcoreapp2.0\WebApplication2.dll
  WebApplication2 -> C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm\
Services to deploy:

descriptor:      [C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm\app.yaml]
source:          [C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm]
target project:  [surferjeff-test2]
target service:  [default]
target version:  [20171117t153449]
target url:      [https://surferjeff-test2.appspot.com]

Beginning deployment of service [default]...
Building and pushing image for service [default]
Started cloud build [be39d55f-599a-45d9-8212-cc7665662fc3].
To see logs in the Cloud Console: https://console.cloud.google.com/gcr/builds/be39d55f-599a-45d9-8212-cc7665662fc3?project=surferjeff-test2
----------------------------- REMOTE BUILD OUTPUT ------------------------------
starting build "be39d55f-599a-45d9-8212-cc7665662fc3"

FETCHSOURCE
Fetching storage object: gs://staging.surferjeff-test2.appspot.com/us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest#1510961690859779
Copying gs://staging.surferjeff-test2.appspot.com/us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest#1510961690859779...
/ [0 files][    0.0 B/649.4 KiB]                                                
/ [1 files][649.4 KiB/649.4 KiB]                                                

Operation completed over 1 objects/649.4 KiB.                                    
tar: WebApplication2.PrecompiledViews.dll: time stamp 2017-11-17 23:35:02 is 4.057456644 s in the future
tar: WebApplication2.PrecompiledViews.pdb: time stamp 2017-11-17 23:35:02 is 4.057054955 s in the future
tar: WebApplication2.deps.json: time stamp 2017-11-17 23:35:02 is 4.055226813 s in the future
tar: WebApplication2.dll: time stamp 2017-11-17 23:34:59 is 1.055165041 s in the future
tar: WebApplication2.pdb: time stamp 2017-11-17 23:34:59 is 1.055135239 s in the future
tar: WebApplication2.runtimeconfig.json: time stamp 2017-11-17 23:35:02 is 4.055110904 s in the future
tar: app.yaml: time stamp 2017-11-17 23:35:03 is 5.055090804 s in the future
tar: web.config: time stamp 2017-11-17 23:35:02 is 4.055031939 s in the future
BUILD
Step #0: Pulling image: gcr.io/gcp-runtimes/aspnetcorebuild@sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb
Step #0: sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb: Pulling from gcp-runtimes/aspnetcorebuild
Step #0: da859c16439c: Already exists
Step #0: f341f81212ab: Pulling fs layer
Step #0: 581119a9a107: Pulling fs layer
Step #0: 564d4d06dac6: Pulling fs layer
Step #0: be3958556b95: Pulling fs layer
Step #0: be3958556b95: Waiting
Step #0: 564d4d06dac6: Verifying Checksum
Step #0: 564d4d06dac6: Download complete
Step #0: 581119a9a107: Verifying Checksum
Step #0: 581119a9a107: Download complete
Step #0: be3958556b95: Verifying Checksum
Step #0: be3958556b95: Download complete
Step #0: f341f81212ab: Verifying Checksum
Step #0: f341f81212ab: Download complete
Step #0: f341f81212ab: Pull complete
Step #0: 581119a9a107: Pull complete
Step #0: 564d4d06dac6: Pull complete
Step #0: be3958556b95: Pull complete
Step #0: Digest: sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb
Step #0: Status: Downloaded newer image for gcr.io/gcp-runtimes/aspnetcorebuild@sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb
Starting Step #0
Finished Step #0
Step #1: Pulling image: gcr.io/cloud-builders/docker@sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec
Step #1: sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec: Pulling from cloud-builders/docker
Step #1: ae79f2514705: Already exists
Step #1: 5ad56d5fc149: Pulling fs layer
Step #1: 170e558760e8: Pulling fs layer
Step #1: 395460e233f5: Pulling fs layer
Step #1: 6f01dc62e444: Pulling fs layer
Step #1: ce78d9a4a7d7: Pulling fs layer
Step #1: a098624c8a71: Pulling fs layer
Step #1: 6f01dc62e444: Waiting
Step #1: ce78d9a4a7d7: Waiting
Step #1: a098624c8a71: Waiting
Step #1: 170e558760e8: Verifying Checksum
Step #1: 170e558760e8: Download complete
Step #1: 5ad56d5fc149: Verifying Checksum
Step #1: 5ad56d5fc149: Download complete
Step #1: 395460e233f5: Verifying Checksum
Step #1: 395460e233f5: Download complete
Step #1: 5ad56d5fc149: Pull complete
Step #1: 6f01dc62e444: Verifying Checksum
Step #1: 6f01dc62e444: Download complete
Step #1: 170e558760e8: Pull complete
Step #1: 395460e233f5: Pull complete
Step #1: 6f01dc62e444: Pull complete
Step #1: a098624c8a71: Verifying Checksum
Step #1: a098624c8a71: Download complete
Step #1: ce78d9a4a7d7: Verifying Checksum
Step #1: ce78d9a4a7d7: Download complete
Step #1: ce78d9a4a7d7: Pull complete
Step #1: a098624c8a71: Pull complete
Step #1: Digest: sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec
Step #1: Status: Downloaded newer image for gcr.io/cloud-builders/docker@sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec
Starting Step #1
Step #1: Sending build context to Docker daemon  2.822MB

Step #1: Step 1/4 : FROM gcr.io/google-appengine/aspnetcore@sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778
Step #1: sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778: Pulling from google-appengine/aspnetcore
Step #1: da859c16439c: Already exists
Step #1: 41b3caecd084: Pulling fs layer
Step #1: f12f8a16d6a6: Pulling fs layer
Step #1: 41b3caecd084: Verifying Checksum
Step #1: 41b3caecd084: Download complete
Step #1: 41b3caecd084: Pull complete
Step #1: f12f8a16d6a6: Verifying Checksum
Step #1: f12f8a16d6a6: Download complete
Step #1: f12f8a16d6a6: Pull complete
Step #1: Digest: sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778
Step #1: Status: Downloaded newer image for gcr.io/google-appengine/aspnetcore@sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778
Step #1:  ---> 4dfd878cbc27
Step #1: Step 2/4 : ADD ./ /app
Step #1:  ---> 4b01cfbe5827
Step #1: Removing intermediate container a33362d1c5ba
Step #1: Step 3/4 : WORKDIR /app
Step #1:  ---> 5259b8d160cb
Step #1: Removing intermediate container 9c5c989793ab
Step #1: Step 4/4 : ENTRYPOINT dotnet WebApplication2.dll
Step #1:  ---> Running in 633348d109d7
Step #1:  ---> f99937719370
Step #1: Removing intermediate container 633348d109d7
Step #1: Successfully built f99937719370
Step #1: Successfully tagged us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest
Finished Step #1
PUSH
Pushing us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest
The push refers to a repository [us.gcr.io/surferjeff-test2/appengine/default.20171117t153449]
4803c66ac02b: Preparing
dff38f28221e: Preparing
aab344da8038: Preparing
5a2c5095cca1: Preparing
dff38f28221e: Layer already exists
5a2c5095cca1: Layer already exists
aab344da8038: Layer already exists
4803c66ac02b: Pushed
latest: digest: sha256:a7633cded3bc90fb41f5d31ffd4dcacec2978bc49bc2869e99addbb3ec5e709c size: 1164
DONE
--------------------------------------------------------------------------------

Updating service [default] (this may take several minutes)...
......................................................................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:
Error:
  An assembly specified in the application dependencies manifest (WebApplication2.deps.json) was not found:
    package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'
    path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.3.xml

Failed to deploy project WebApplication2 to App Engine Flex.
benwulfe commented 6 years ago

Seems related to an old issue here:

https://github.com/dotnet/cli/issues/6516

On Fri, Nov 17, 2017 at 4:47 PM, Jeffrey Rennie notifications@github.com wrote:

Here's the build log:

Publishing WebApplication2 to Compute Engine. dotnet publish -o "C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm" -c Release Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

WebApplication2 -> C:\Users\DPE Admin\source\repos\WebApplication2\WebApplication2\bin\Release\netcoreapp2.0\WebApplication2.dll WebApplication2 -> C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm\ Services to deploy:

descriptor: [C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm\app.yaml] source: [C:\Users\DPE Admin\AppData\Local\Temp\0jyto2oj.5pm] target project: [surferjeff-test2] target service: [default] target version: [20171117t153449] target url: [https://surferjeff-test2.appspot.com]

Beginning deployment of service [default]... Building and pushing image for service [default] Started cloud build [be39d55f-599a-45d9-8212-cc7665662fc3]. To see logs in the Cloud Console: https://console.cloud.google.com/gcr/builds/be39d55f-599a-45d9-8212-cc7665662fc3?project=surferjeff-test2 ----------------------------- REMOTE BUILD OUTPUT ------------------------------ starting build "be39d55f-599a-45d9-8212-cc7665662fc3"

FETCHSOURCE Fetching storage object: gs://staging.surferjeff-test2.appspot.com/us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest#1510961690859779 Copying gs://staging.surferjeff-test2.appspot.com/us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest#1510961690859779... / [0 files][ 0.0 B/649.4 KiB] / [1 files][649.4 KiB/649.4 KiB]

Operation completed over 1 objects/649.4 KiB. tar: WebApplication2.PrecompiledViews.dll: time stamp 2017-11-17 23:35:02 is 4.057456644 s in the future tar: WebApplication2.PrecompiledViews.pdb: time stamp 2017-11-17 23:35:02 is 4.057054955 s in the future tar: WebApplication2.deps.json: time stamp 2017-11-17 23:35:02 is 4.055226813 s in the future tar: WebApplication2.dll: time stamp 2017-11-17 23:34:59 is 1.055165041 s in the future tar: WebApplication2.pdb: time stamp 2017-11-17 23:34:59 is 1.055135239 s in the future tar: WebApplication2.runtimeconfig.json: time stamp 2017-11-17 23:35:02 is 4.055110904 s in the future tar: app.yaml: time stamp 2017-11-17 23:35:03 is 5.055090804 s in the future tar: web.config: time stamp 2017-11-17 23:35:02 is 4.055031939 s in the future BUILD Step #0: Pulling image: gcr.io/gcp-runtimes/aspnetcorebuild@sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb Step #0: sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb: Pulling from gcp-runtimes/aspnetcorebuild Step #0: da859c16439c: Already exists Step #0: f341f81212ab: Pulling fs layer Step #0: 581119a9a107: Pulling fs layer Step #0: 564d4d06dac6: Pulling fs layer Step #0: be3958556b95: Pulling fs layer Step #0: be3958556b95: Waiting Step #0: 564d4d06dac6: Verifying Checksum Step #0: 564d4d06dac6: Download complete Step #0: 581119a9a107: Verifying Checksum Step #0: 581119a9a107: Download complete Step #0: be3958556b95: Verifying Checksum Step #0: be3958556b95: Download complete Step #0: f341f81212ab: Verifying Checksum Step #0: f341f81212ab: Download complete Step #0: f341f81212ab: Pull complete Step #0: 581119a9a107: Pull complete Step #0: 564d4d06dac6: Pull complete Step #0: be3958556b95: Pull complete Step #0: Digest: sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb Step #0: Status: Downloaded newer image for gcr.io/gcp-runtimes/aspnetcorebuild@sha256:d7b7975acb374fc3a9655a4e529993e6270cfa78023885684626528bc379f8eb Starting Step #0 Finished Step #0 Step #1: Pulling image: gcr.io/cloud-builders/docker@sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec Step #1: sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec: Pulling from cloud-builders/docker Step #1: ae79f2514705: Already exists Step #1: 5ad56d5fc149: Pulling fs layer Step #1: 170e558760e8: Pulling fs layer Step #1: 395460e233f5: Pulling fs layer Step #1: 6f01dc62e444: Pulling fs layer Step #1: ce78d9a4a7d7: Pulling fs layer Step #1: a098624c8a71: Pulling fs layer Step #1: 6f01dc62e444: Waiting Step #1: ce78d9a4a7d7: Waiting Step #1: a098624c8a71: Waiting Step #1: 170e558760e8: Verifying Checksum Step #1: 170e558760e8: Download complete Step #1: 5ad56d5fc149: Verifying Checksum Step #1: 5ad56d5fc149: Download complete Step #1: 395460e233f5: Verifying Checksum Step #1: 395460e233f5: Download complete Step #1: 5ad56d5fc149: Pull complete Step #1: 6f01dc62e444: Verifying Checksum Step #1: 6f01dc62e444: Download complete Step #1: 170e558760e8: Pull complete Step #1: 395460e233f5: Pull complete Step #1: 6f01dc62e444: Pull complete Step #1: a098624c8a71: Verifying Checksum Step #1: a098624c8a71: Download complete Step #1: ce78d9a4a7d7: Verifying Checksum Step #1: ce78d9a4a7d7: Download complete Step #1: ce78d9a4a7d7: Pull complete Step #1: a098624c8a71: Pull complete Step #1: Digest: sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec Step #1: Status: Downloaded newer image for gcr.io/cloud-builders/docker@sha256:aa949d45f505028b03147d748e88cb72ad360dd13baacc492052fd6b0239b5ec Starting Step #1 Step #1: Sending build context to Docker daemon 2.822MB

Step #1: Step 1/4 : FROM gcr.io/google-appengine/aspnetcore@sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778 Step #1: sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778: Pulling from google-appengine/aspnetcore Step #1: da859c16439c: Already exists Step #1: 41b3caecd084: Pulling fs layer Step #1: f12f8a16d6a6: Pulling fs layer Step #1: 41b3caecd084: Verifying Checksum Step #1: 41b3caecd084: Download complete Step #1: 41b3caecd084: Pull complete Step #1: f12f8a16d6a6: Verifying Checksum Step #1: f12f8a16d6a6: Download complete Step #1: f12f8a16d6a6: Pull complete Step #1: Digest: sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778 Step #1: Status: Downloaded newer image for gcr.io/google-appengine/aspnetcore@sha256:365627b6182da57b249b4cceb5ecb0c22db7df2c0bd43f46d303115adf47a778 Step #1: ---> 4dfd878cbc27 Step #1: Step 2/4 : ADD ./ /app Step #1: ---> 4b01cfbe5827 Step #1: Removing intermediate container a33362d1c5ba Step #1: Step 3/4 : WORKDIR /app Step #1: ---> 5259b8d160cb Step #1: Removing intermediate container 9c5c989793ab Step #1: Step 4/4 : ENTRYPOINT dotnet WebApplication2.dll Step #1: ---> Running in 633348d109d7 Step #1: ---> f99937719370 Step #1: Removing intermediate container 633348d109d7 Step #1: Successfully built f99937719370 Step #1: Successfully tagged us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest Finished Step #1 PUSH Pushing us.gcr.io/surferjeff-test2/appengine/default.20171117t153449:latest The push refers to a repository [us.gcr.io/surferjeff-test2/appengine/default.20171117t153449] 4803c66ac02b: Preparing dff38f28221e: Preparing aab344da8038: Preparing 5a2c5095cca1: Preparing dff38f28221e: Layer already exists 5a2c5095cca1: Layer already exists aab344da8038: Layer already exists 4803c66ac02b: Pushed latest: digest: sha256:a7633cded3bc90fb41f5d31ffd4dcacec2978bc49bc2869e99addbb3ec5e709c size: 1164 DONE

Updating service [default] (this may take several minutes)... ......................................................................................................failed. ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error: Error: An assembly specified in the application dependencies manifest (WebApplication2.deps.json) was not found: package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1' path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll' This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.3.xml

Failed to deploy project WebApplication2 to App Engine Flex.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/google-cloud-visualstudio/issues/847#issuecomment-345403622, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7cpc8g3I2xvwTnpg10l2fbPIlB9ra6ks5s3ikqgaJpZM4QizMz .

SurferJeffAtGoogle commented 6 years ago

It definitely looks related to that issue, but I don't understand how to work around it.

ivannaranjo commented 6 years ago

Oh I see... Actually, we have not yet published the 2.0.3 version of the .NET Core runtime. See PR in aspnetcore

ivannaranjo commented 6 years ago

Hmmm... Just tried to repo this with VS 2017 and I had no issue. What template are you using? Is the app available somewhere I can try?

SurferJeffAtGoogle commented 6 years ago

The animated gif shows which template and which options I'm choosing.

SurferJeffAtGoogle commented 6 years ago

I tried updating visual studio 2017 to latest version and I still see the same error.

Microsoft Visual Studio Community 2017 
Version 15.4.4
VisualStudio.15.Release/15.4.4+27004.2009
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Community

Visual Basic 2017   00369-60000-00001-AA591
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA591
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA591
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA591
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.9.00809.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30925.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.50921.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30915.0
Azure App Service Tools v3.0.0

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DeployToGae Extension   1.0
DeployToGae Visual Studio Extension Detailed Info

JavaScript Language Service   2.0
JavaScript Language Service

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   4.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

TypeScript   2.3.5.0
TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake
SurferJeffAtGoogle commented 6 years ago

I still have no work-arounds. An application created with "dotnet new MVC" suffers the same problem.

SurferJeffAtGoogle commented 6 years ago

And deploying from a new Google Cloud Platform Web Application template fails with this error:

Publishing GcpProject2 to Compute Engine.
dotnet publish -o "C:\Users\Jeffrey Rennie\AppData\Local\Temp\jpolqxei.lnu" -c Release
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  GcpProject2 -> C:\Users\Jeffrey Rennie\source\repos\GcpProject2\GcpProject2\bin\Release\netcoreapp2.0\GcpProject2.dll
  It was not possible to find any compatible framework version

  The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found.

    - Check application dependencies and target a framework version installed at:

        \

    - Alternatively, install the framework version '1.0.0'.

C:\Users\Jeffrey Rennie\source\repos\GcpProject2\GcpProject2\GcpProject2.csproj(24,5): error MSB3073: The command "dotnet bundle" exited with code -2147450749.
Failed to deploy project GcpProject2 to App Engine Flex.
ivannaranjo commented 6 years ago

The fact that the "dotnet publish" command failed can indicate a corrupted installation. It is interesting that is looking for the reference assemblies at the \ path, instead of the right location.

Would you be able to try this out in a different machine?

ivannaranjo commented 6 years ago

Just realized that the last entry refers to the 1.0.0 runtime, which means you probably don't have an SDK that supports netcoreapp1.0 installed on the machine. The fact that we allow you to instantiate that template is indeed a bug.

ivannaranjo commented 6 years ago

Can you list the SDKs that you have installed? Typically they will be under c:\Program Files\dotnet\sdk.

SurferJeffAtGoogle commented 6 years ago

I got some juicy details here: On a machine with the following dotnet core SDKs installed: 1.0.1 1.0.4 1.1.0 2.0.0 2.0.2

The app engine flex deploy succeeded. Then, I uninstalled 2.0.0 and 2.0.2 and installed 2.0.3, and the app engine deploy failed with the exact error above.

SurferJeffAtGoogle commented 6 years ago

I reinstalled 2.0.2, and it failed as before.

SurferJeffAtGoogle commented 6 years ago

I reinstalled 2.0.0, and it failed as before.

SurferJeffAtGoogle commented 6 years ago

I uninstalled 2.0.3 and it still failed as before!

SurferJeffAtGoogle commented 6 years ago

Created a new project, and it succeeded.

So to reproduce the bug, it looks like you must run 'dotnet new mvc' with version 2.0.3 of the SDK.

ivannaranjo commented 6 years ago

Ok, the 2.0.3 image is not yet released in App Engine, which is why you are seeing this. It would be good for the extension to have an error message about this (not sure how it will be done) but this is not a P0, this is what happens when you used an unsupported SDK.

I have confirmed many times that if you use the 2.0.0 SDK the resulting apps will deploy successfully.

The core of the problem is this:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
  </ItemGroup>

  <!-- Copy the app.yaml on publish -->
  <ItemGroup>
    <None Include="app.yaml" CopyToOutputDirectory="Always" />
  </ItemGroup>

</Project>

The Microsoft.AspNetCore.All metapackage is version 2.0.3 which requires the 2.0.3 runtime to run. I have confirmed that a 2.0.0 app will deploy successfully.

SurferJeffAtGoogle commented 6 years ago

I'm glad you found the origin of the issue.

I'm re-opening this bug because it is still a frustrating dead end for the user. When users first try the extension, they have no concept of a "supported SDK." All they know is that:

  1. Deploying a new .NET core app fails.
  2. Deploying a GCP .NET core app fails.
  3. Therefore, Google App Engine is broken. Google really don't know what they're doing when it comes to .NET.

Point 3 is not true, but it's a natural conclusion to draw. First impressions are critical.

When the VS extension begins a deploy, the extension should verify that the app being deployed is compatible with App Engine Flex, and give the user an error message that will help them understand and work around the situation.

turtletramp commented 6 years ago

I had the same issue today with the same error Message. It took me a while to figure out how to work around it. I am running dotnet cli on Ubuntu.

Workaround: Edit the .csproj file and reduce the asp.net core version used. My previous dependency which showed the same error message: <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" /> And it worked today with this dependency: <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />

After changing the AspNetCore.All version using dotnet publish -c release and then gcloud app deploy ... worked.

Thanks to the above hints I could find my way around this issue.

iantalarico commented 6 years ago

@turtletramp Thanks for the extra information and report of this issue. We will work on fixing this issue in the few months.

carlpaten commented 6 years ago

I've also hit this issue, until it's fixed I have no idea how to use .NET Core on GCP, or even whether it's possible at all.

Thank you @iantalarico for looking into this.

kmuthukumar23 commented 4 years ago

I am also facing the same issue when published the asp.net core blazor server app in to GCP.

image

dheerajyadav25 commented 4 years ago

I had the same issue today with the same error Message. It took me a while to figure out how to work around it. I am running dotnet cli on Ubuntu.

Workaround: Edit the .csproj file and reduce the asp.net core version used. My previous dependency which showed the same error message: <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" /> And it worked today with this dependency: <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />

After changing the AspNetCore.All version using dotnet publish -c release and then gcloud app deploy ... worked.

Thanks to the above hints I could find my way around this issue.

this will not work in core 3.0 + since its removed

mouleja commented 4 years ago

I had the same problem trying to work through the tutorial at: https://codelabs.developers.google.com/codelabs/cloud-app-engine-aspnetcore/#6

with the key error-out: Step #0: No valid .NET Core runtime version found for the app or it is not a supported app.

I tried unsuccessfully to change the aspnetcore version to 2.2 and 2.1 which result in build errors.