Maria
Maria

Reputation: 41

Issue deploying to Google Cloud AppEngine (Flex)

I attempted to deploy a .NET app from Visual Studio to the Google Cloud App Engine (flex) and repeatedly got the error below:

"An assembly specified in the application dependencies manifest (.deps.json) was not found: package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.3' 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.8.xml"

I've downloaded the newest .NET Core SDK, and newest runtime file. And I can see the antiforgery dll file here at this path:

C:\Program Files\dotnet\store\x64\netcoreapp2.0\microsoft.aspnetcore.antiforgery\2.0.3\lib\netstandard2.0\Microsoft.AspNetCore.Antiforgery.dll

When I attempt to google this issue, I mostly see people refer to using Microsoft Azure not Google Cloud, so I'm unsure if those solutions pertain to me? Generally those solutions refer to a "runtime" that isn't the same version number? I'm relatively new to this, so I'd appreciate any help I can get!

Oh also, using the following line of code in my .csproj: <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> fixes the error so that I'm able to deploy to the cloud, but I've read that it's not a good solution, so I'd like to try to fix it without using that line of code.

Also, when I tried installing google cloud SDK, I had the following two errors: 1) File "C:\Users\Maria\AppData\Local\Programs\Python\Python36\lib\re.py", line 142, in class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag'

2) File "C:\Users\Maria\AppData\Local\Programs\Python\Python36\lib\os.py", line 730, in check_str raise TypeError("str expected, not %s" % type(value).name) TypeError: str expected, not bytes

Upvotes: 0

Views: 337

Answers (2)

Maria
Maria

Reputation: 41

It seemed this was an issue with Google Cloud at the time due to the newest update to 2.0.8. I instead deployed on Microsoft Azure and had no issues. I would expect 2 months later now that Google Cloud will have updated to be compatible.

Upvotes: 0

Chanseok Oh
Chanseok Oh

Reputation: 4306

For the Python problem, I see that the Cloud SDK documentation says

System requirements

Cloud SDK runs on Linux, Mac OS X and Windows. It requires Python 2.7.x and doesn't currently support Python 3.

I know virtually nothing about Python, but your path looks like Python 3.

I believe the Cloud SDK installer bundles Python in it and there is an option you can check to install the bundled Python during installation.

Upvotes: 1

Related Questions