无法在AWS Lambda的.net核心上加载文件或程序集'AWSSDK.Core [英] Could not load file or assembly 'AWSSDK.Core On .net core in AWS Lambda

查看:164
本文介绍了无法在AWS Lambda的.net核心上加载文件或程序集'AWSSDK.Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用此模板,我一直在尝试获取Lambda函数正在运行。当执行包含

Using this template, I've been trying to get a Lambda function running. When it goes to execute a module containing

open Amazon
open Amazon.S3

它会爆炸


errorType : FileNotFoundException,

"errorType": "FileNotFoundException",

errorMessage:无法加载文件或程序集'AWSSDK.Core,版本= 3.3.0.0,文化=中性,PublicKeyToken = 885c28607f98e604 '。系统找不到指定的文件。,`

"errorMessage": "Could not load file or assembly 'AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.",`

我尝试了 nuget install AWSSDK.Core无效。

I've tried a nuget install of AWSSDK.Core to no avail.

Errors in /Users/sanitized/aws_lambda/project.json
    Package AWSSDK.Core 3.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package AWSSDK.Core 3.1.0 supports:
      - monoandroid (MonoAndroid,Version=v0.0)
      - net35 (.NETFramework,Version=v3.5)
      - net45 (.NETFramework,Version=v4.5)
      - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
      - win8 (Windows,Version=v8.0)
      - wp8 (WindowsPhone,Version=v8.0)
      - wpa81 (WindowsPhoneApp,Version=v8.1)
      - xamarinios10 (Xamarin.iOS,Version=v1.0)
      - xamarinmac20 (Xamarin.Mac,Version=v2.0)
    One or more packages are incompatible with .NETCoreApp,Version=v1.0.

这是我项目的依赖项部分:

Here's the dependencies section of my project:

  "dependencies": {
    "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*",
    "Amazon.Core": "0.6.0",
    "Amazon.Lambda.Core": "1.0.0*",
    "Amazon.Lambda.Serialization.Json": "1.0.0",
    "Amazon.Lambda.Tools": {
      "type": "build",
      "version": "1.0.0-preview1"
    }
  },

Lambda库似乎正确加载,但是尝试使用S3客户端会中断。

The Lambda libraries seem to load correctly, but attempting to use an S3 client breaks. What're the .net-core blessed equivalents of AWSSDK.Core and AWSSDK.S3?

推荐答案

错误状态如下:

是AWSSDK.Core和AWSSDK.S3的.net核心祝福等效项吗? / p>

As the error states:


包装AWSSDK.Core 3.1.0与netcoreapp1.0不兼容
(.NETCoreApp,Version = v1.0)

Package AWSSDK.Core 3.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0)

根据此链接


To use the the AWS sdk in ASP.NET Core based applications you 
need to use the 3.2.X versions of the NuGet packages. 
Note, they are currently marked as beta.


这篇关于无法在AWS Lambda的.net核心上加载文件或程序集'AWSSDK.Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆