gpt4 book ai didi

amazon-web-services - 无法在 AWS Lambda 的 .net 核心上加载文件或程序集 'AWSSDK.Core

转载 作者:行者123 更新时间:2023-12-02 01:18:01 26 4
gpt4 key购买 nike

使用 this template,我一直在尝试运行 Lambda 函数。当它去执行包含

的模块时
open Amazon
open Amazon.S3

爆炸了

"errorType": "FileNotFoundException",

"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.",`

我尝试了 AWSSDK.Core 的 nuget 安装 但没有成功。

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.

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

  "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 客户端会中断。 AWSSDK.Core 和 AWSSDK.S3 的 .net-core 等价物是什么?

最佳答案

如错误所述:

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

根据 this link :

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.

关于amazon-web-services - 无法在 AWS Lambda 的 .net 核心上加载文件或程序集 'AWSSDK.Core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41683460/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com