无法在 AWS Lambda 的 .net 核心上加载文件或程序集 'AWSSDK.Core
Could not load file or assembly 'AWSSDK.Core On .net core in AWS Lambda
使用 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 install
无济于事。
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.
使用 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 install
无济于事。
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.