Amazon AWSClientFactory不存在 [英] Amazon AWSClientFactory does not exists

查看:173
本文介绍了Amazon AWSClientFactory不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个空的.Net Core应用程序,并为Amazon.Core和Amazon.S3安装了nuget包.

I created an empty .Net Core application and installed nuget packages for Both Amazon.Core and Amazon.S3.

然后我尝试使用S3获取对象,但一开始我就被卡住了……程序集内无处可找到Amazon.AWSClientFactory.即使使用dotPeek,我也尝试搜索此工厂方法,但找不到.甚至来自亚马逊的示例代码也不起作用.

Then I tried to use S3 to get an object but I'm stuck at the very first moment... Amazon.AWSClientFactory is nowhere to be found inside the assembly. Even with dotPeek I tried to search this factory method but I couldn't find it. Even the sample code from Amazon doesn't work.

我应该在哪里找到这个课程?

Where I supposed to find this class ?

推荐答案

Amazon.Core和Amazon.S3是适用于.NET v3的AWS开发工具包的一部分.根据适用于.NET版本3的AWS开发工具包SDK迁移指南 :

Amazon.Core and Amazon.S3 are part of the AWS SDK for .NET v3. Per the AWS SDK for .NET Version 3 Migration Guide:

更改:AWSClientFactory已删除

Change: AWSClientFactory is removed

说明:使用服务客户端构造函数而不是AWSClientFactory

Description: Use service client constructors instead of the AWSClientFactory

或者换句话说,使用在Amazon.S3 nuget包中找到的IAmazonS3和AmazonS3Client:

Or in other words, use IAmazonS3 and AmazonS3Client found in the Amazon.S3 nuget package:

using (IAmazonS3 client = new AmazonS3Client())
{
  // do stuff
}

进一步阅读

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