Amazon AWSClientFactory不存在

编程入门 行业动态 更新时间:2024-10-26 08:24:11
本文介绍了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 }

进一步阅读

  • AWS文档-使用适用于.NET的AWS开发工具包获取对象
  • AWS文档-AmazonS3Client
  • Further Reading

    • AWS Documentation - Get an Object Using the AWS SDK for .NET
    • AWS Documentation - AmazonS3Client

更多推荐

Amazon AWSClientFactory不存在

本文发布于:2023-10-07 10:32:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469149.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不存在   Amazon   AWSClientFactory

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!