Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library with newer versions of the AWS SDK #45

Open
Kralizek opened this issue Feb 10, 2021 · 7 comments
Open

How to use this library with newer versions of the AWS SDK #45

Kralizek opened this issue Feb 10, 2021 · 7 comments
Labels
question Further information is requested

Comments

@Kralizek
Copy link
Owner

Kralizek commented Feb 10, 2021

A very common issue being reported when trying to install this package in a project using packages of the AWS SDK newer than 3.3.

This issue is caused because the AWS SDK has strict version boundaries forcing the usage of packages within the same major version family (e.g. you can't mix the AWS S3 3.5 package with AWS EC2 3.3 package).

This library is built targeting the AWS SDK 3.3 but, unlike the AWS SDK, it doesn't have strict limits on the targeted AWS SDK version so it's possible to use this library in projects targeting the AWS SDK 3.4 or newer.

To do so, you can simply leverage the automatic assembly redirect built into the .NET SDK projects.

Normally your project file would look like

<ItemGroup>
 <PackageReference Include="Kralizek.Extensions.Configuration.AWSSecretsManager" Version="1.5.0" />
</ItemGroup>

Let's assume you wanted to add the latest package for S3, you would do

$> dotnet add package AWSSDK.S3

This would give you the following message

error: NU1107: Version conflict detected for AWSSDK.Core. Install/reference AWSSDK.Core 3.5.2.9 directly to project SecretsManagerSDK to resolve this issue.
error:  SecretsManagerSDK -> AWSSDK.S3 3.5.8.4 -> AWSSDK.Core (>= 3.5.2.9 && < 3.6.0)
error:  SecretsManagerSDK -> Kralizek.Extensions.Configuration.AWSSecretsManager 1.5.0 -> AWSSDK.SecretsManager 3.3.0 -> AWSSDK.Core (>= 3.3.21.20 && < 3.4.0).
info : Package 'AWSSDK.S3' is compatible with all the specified frameworks in project 'C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj'.
info : PackageReference for package 'AWSSDK.S3' version '3.5.8.4' updated in file 'C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj'.
info : Committing restore...
info : Writing assets file to disk. Path: C:\Development\Tests\SecretsManagerSDK\obj\project.assets.json
log  : Failed to restore C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj (in 233 ms).

To solve this issue, first install the latest version of AWSSDK.SecretsManager

$> dotnet add package AWSSDK.SecretsManager

Then, install the S3 package

$> dotnet add package AWSSDK.S3

Your project file will eventually look like this

<ItemGroup>
  <PackageReference Include="AWSSDK.S3" Version="3.5.8.4" />
  <PackageReference Include="AWSSDK.SecretsManager" Version="3.5.0.69" />
  <PackageReference Include="Kralizek.Extensions.Configuration.AWSSecretsManager" Version="1.5.0" />
</ItemGroup>
@brignolij
Copy link

Hi @Kralizek ,
thanks for your work.
Regarding the sourcecode on github AWSSDK.SecretsManager 3.7.XX is used. But on nuget.org AWSSDK.SecretsManager 3.3.X is used, is it possible to make an update on nuget.org ?

Regards

@Kralizek
Copy link
Owner Author

Hi @Kralizek ,
thanks for your work.
Regarding the sourcecode on github AWSSDK.SecretsManager 3.7.XX is used. But on nuget.org AWSSDK.SecretsManager 3.3.X is used, is it possible to make an update on nuget.org ?

Regards

I'm waiting for a couple more PRs to be merged before releasing a new version.

@crowz4k
Copy link

crowz4k commented Jul 11, 2023

Hey @Kralizek ,
I appreciate your work on making an update on this.
I was wondering, are there any updates?

@Kralizek
Copy link
Owner Author

Hi @crowz4k , I'm currently on summer vacation. My plan is to spend some time on releasing the newest version sometimes before the end of August, but I can't promise anything. Is there any major issue stopping you?

@crowz4k
Copy link

crowz4k commented Jul 11, 2023

Thank you! No no, no worries, I was just wondering.

@lamchowing
Copy link

Hi, @Kralizek. Thank you for your work. I'm wondering if you get a chance to update the AWS secrets manager to 3.7.

@Kralizek
Copy link
Owner Author

Kralizek commented Jan 8, 2024

Hi @lamchowing, right now I don't have loads of time to put on this library. If there is a specific scenario that requires upgrading this library to be built targeting 3.7 rather than leveraging binding redirects as explained in this post, please report an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants