Giter VIP home page Giter VIP logo

amazon-qldb-driver-dotnet's Introduction

Amazon QLDB .NET Driver

This is the .NET driver for Amazon Quantum Ledger Database (QLDB), which allows .NET developers to write software that makes use of AmazonQLDB.

nuget license AWS Provider codecov

Requirements

Basic Configuration

See Accessing Amazon QLDB for information on connecting to AWS.

.NET Standard 2.0

The driver targets .NET Standard 2.0.

Getting Started

Please see the Quickstart guide for the Amazon QLDB Driver for .Net.

See Also

  1. Using the Amazon QLDB Driver for .NET — The best way to get familiar with the Amazon QLDB Driver for .NET is to read Getting Started with the Amazon QLDB Driver in the Amazon QLDB Developer Guide.
  2. QLDB .NET Driver accepts and returns Amazon ION Documents. Amazon Ion is a richly-typed, self-describing, hierarchical data serialization format offering interchangeable binary and text representations. For more information read the ION docs.
    1. In version >=1.3.0, support is added for accepting and returning native C# types. See here for a quick guide on how to use this new feature.
  3. Amazon ION Cookbook: This cookbook provides code samples for some simple Amazon Ion use cases.
  4. Amazon QLDB supports the PartiQL query language. PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. For more information read the PartiQL docs.
  5. Refer the section Common Errors while using the Amazon QLDB Drivers which describes runtime errors that can be thrown by the Amazon QLDB Driver when calling the qldb-session APIs.

Development

Setup

Assuming that Visual Studio is being used, open the solution file (Amazon.QLDB.Driver.sln).

Right click the solution in the Solution Explorer and press "Restore NuGet Packages" if it does not do so automatically.

Running Tests

You can run the unit tests by right clicking the Amazon.QLDB.Driver.Tests project, that is a part of the solution file, and pressing "Run Tests".

Alternatively you can run the unit tests on the command line with the following:

dotnet test Amazon.QLDB.Driver.Tests

To run the integration tests, you must run it on the command line with the following:

dotnet test Amazon.QLDB.Driver.IntegrationTests --settings Amazon.QLDB.Driver.IntegrationTests/.runsettings

Documentation

DocFx is used for documentation. Download Docfx as docfx.zip, unzip and extract it to a local folder, and add it to PATH.

You can generate the docstring HTML locally by running the following in the root directory of this repository:

docfx docs/docfx.json --serve

License

This library is licensed under the Apache 2.0 License.

amazon-qldb-driver-dotnet's People

Contributors

adrianiftode avatar allimn avatar alpian avatar amazon-auto avatar amzn-paunort avatar aurghob33 avatar battesonb avatar butleragrant avatar bwinchester avatar byronlin13 avatar costleya avatar dependabot[bot] avatar dominitio avatar guyilin-amazon avatar justing-bq avatar othonrsanchez avatar plasmaintec avatar r-maan avatar simonz-bq avatar yoroto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-qldb-driver-dotnet's Issues

IonTextWriterBuilder write timestamp fails

When using the IonTextWriterBuilder with IonTextOptions { TimestampAsMillis = false } writing of timestamps result in an System.FormatException.

Example code

{
      using (var tw = new StringWriter())
      using (var writer = IonTextWriterBuilder.Build(tw, new IonTextOptions { TimestampAsMillis = false }))
      {
          writer.Flush();
          writer.StepIn(IonType.Struct);

          writer.SetFieldName("exampleDate");
          writer.WriteTimestamp(new Timestamp(exampleDate));

          writer.StepOut();
          writer.Finish();
      
          command = tw.ToString();
      }
      
      var result = IonLoader.Default.Load(command);
}

Executing this results in the following exception:
image

Package version: 1.0.1

Cannot create instance of AmazonQLDBClient

Hello team I've installed Amazon.QLDB.Driver package and there is not AmazonQLDBClient.
Is it removed? Or do I have to install some other package?
If it's removed then how can I perform operations on ledgers?

Question about public release of the .NET driver

First of all, many thanks to the contributors of the .NET driver for QLDB, your work is very much appreciated.

Are there any plans to release this driver as RC or public release? We are in early stages of evaluating this package and look forward to having a stable .NET SDK.

`Digests don't match` error on .NET Framework 4.6.1

The issue is when an ION document with a struct having more than one field is inserted into a table, then we get the following exception Amazon.QLDBSession.Model.BadRequestException : Digests don't match

There is a draft PR with a test that reproduces this issue.

Associated stack trace

  Error Message:                                                                                                                                                                                                                              
   Test method Amazon.QLDB.Driver.IntegrationTests.StatementExecutionTests.Execute_InsertDocumentWithMultipleFields_DocumentIsInserted threw exception:                                                                                       
Amazon.QLDBSession.Model.BadRequestException: Digests don't match ---> Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an
 error: (400) Bad Request.                                                                                                                                                                                                                    
  Stack Trace:                                                                                                                                                                                                                                
      at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)                                                                                                                                                                   
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)                                                                      
--- End of stack trace from previous location where exception was thrown ---                                                                                                                                                                  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)                                                                                                                                                               
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)                                                                                                                                          
   at Amazon.Runtime.Internal.HttpRequest.<GetResponseAsync>d__16.MoveNext()                                                                                                                                                                  
--- End of inner exception stack trace ---                                                                                                                                                                                                    
    at Amazon.Runtime.Internal.HttpRequest.<GetResponseAsync>d__16.MoveNext()                                                                                                                                                                 
--- End of stack trace from previous location where exception was thrown ---                                                                                                                                                                  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)                                                                                                                                                               
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)                                                                                                                                          
   at Amazon.Runtime.Internal.HttpHandler`1.<InvokeAsync>d__9`1.MoveNext()                                                                                                                                                                    
--- End of stack trace from previous location where exception was thrown ---                                                                                                                                                                  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)                                                                                                                                                               
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)                                                                                                                                          
   at Amazon.Runtime.Internal.Unmarshaller.<InvokeAsync>d__3`1.MoveNext()                                                                                                                                                                     
--- End of stack trace from previous location where exception was thrown ---                                                                                                                                                                  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)                                                                                                                                                               
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)                                                                                                                                          
   at Amazon.Runtime.Internal.ErrorHandler.<InvokeAsync>d__5`1.MoveNext()                                                                                                                                                                     
--- End of inner exception stack trace ---                                                                                                                                                                                                    
    at Amazon.QLDB.Driver.RetryHandler.RetriableExecute[T](Func`1 func, RetryPolicy retryPolicy, Action recoverAction, Action`1 retryAction) in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\retry\RetryHandler.cs:line 66  
   at Amazon.QLDB.Driver.SessionPool.Execute[T](Func`2 func, RetryPolicy retryPolicy, Action`1 retryAction) in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\SessionPool.cs:line 64                                  
   at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func`2 func, RetryPolicy retryPolicy, Action`1 retryAction) in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 223                                    
   at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func`2 func, RetryPolicy retryPolicy) in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 197                                                          
   at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func`2 func) in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 144                                                                                   
   at Amazon.QLDB.Driver.IntegrationTests.StatementExecutionTests.Execute_InsertDocumentWithMultipleFields_DocumentIsInserted() in D:\adi\opensource\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver.IntegrationTests\StatementExecutionTests.cs:
line 286                                                                                                                                                                                                                                      

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Unable to use Amazon.QLDB.Driver with .Net Native AOT

Steps to reproduce

  • Create .Net project dotnet new lambda.NativeAOT --name LambdaNative
  • Use the following Code
  • Build the project with .Net7 with enabling Native AOT
  • Deploy function to AWS Lambda dotnet lambda deploy-function
  • Invoke The Lambda Function

Build Warning

/root/.nuget/packages/amazon.qldb.driver/1.4.0/lib/netstandard2.0/Amazon.QLDB.Driver.dll : warning IL2104: Assembly 'Amazon.QLDB.Driver' produced trim warnings.

/_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfigForwarder.cs(21): Trim analysis warning IL2026: System.Security.Cryptography.CryptoConfigForwarder..cctor(): Using member 'System.Security.Cryptography.CryptoConfigForwarder.BindCreateFromName()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.

Exception

System.ArgumentException: Invalid Algorithm Specified
   at Amazon.QLDB.Driver.QldbDriverBase`1.GetIsSessionDeadAndThrowIfNoRetry(QldbTransactionException qte, T currentSession, Int32 maxRetries, Int32 retryAttempt) + 0x201
   at Amazon.QLDB.Driver.QldbDriverBase`1.<GetShouldReplaceDeadSessionOrThrowIfNoRetryAsync>d__15.MoveNext() + 0x4c
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
   at Amazon.QLDB.Driver.AsyncQldbDriver.<Execute>d__7`1.MoveNext() + 0x476
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44
   at Amazon.QLDB.Driver.AsyncQldbDriver.<Execute>d__6`1.MoveNext() + 0xce
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xc2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x44

Code

using Amazon.QLDB.Driver;
using Amazon.QLDB.Driver.Generic;
using Amazon.QLDB.Driver.Serialization;
using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.SQSEvents;
using Amazon.Lambda.Serialization.SystemTextJson;
using System.Text.Json.Serialization;

namespace LambdaNative;

public class Function
{
    private static IAsyncQldbDriver driver;

    private static async Task Main()
    {
        driver = AsyncQldbDriver.Builder()
            .WithLedger("ledger-name")
            .WithSerializer(new ObjectSerializer())
            .Build();

        Func<SQSEvent, ILambdaContext, Task<SQSBatchResponse>> handler = FunctionHandler;
        await LambdaBootstrapBuilder.Create(handler, new SourceGeneratorLambdaJsonSerializer<LambdaFunctionJsonSerializerContext>())
            .Build()
            .RunAsync();
    }

    public static async Task<SQSBatchResponse> FunctionHandler(SQSEvent input, ILambdaContext context)
    {
        var batchItemFailures = new List<SQSBatchResponse.BatchItemFailure>();

        foreach (var message in input.Records)
        {
            try
            {
                await ProcessMessageAsync(message, context);
            }
            catch (Exception)
            {
                batchItemFailures.Add(new SQSBatchResponse.BatchItemFailure { ItemIdentifier = message.MessageId });
            }
        }
        return new SQSBatchResponse(batchItemFailures);
    }

    private static async Task ProcessMessageAsync(SQSEvent.SQSMessage message, ILambdaContext context)
    {
        IAsyncResult<User> result = await driver.Execute(async txn =>
        {
            return await txn.Execute(txn.Query<Person>("SELECT * FROM Person WHERE Name = ?", "abc"));
        });

        await foreach (Person person in result)
        {
            Console.WriteLine(person.GovId);
            Console.WriteLine(person.FirstName);
        }
    }
}

public class User
{
    public string Id { get; set; }
    public string Name { get; set; }
}

[JsonSerializable(typeof(SQSBatchResponse))]
[JsonSerializable(typeof(SQSEvent))]
public partial class LambdaFunctionJsonSerializerContext : JsonSerializerContext
{

}

[question] Paging

If my query results return over 200 documents, I get a 405 error (No open transaction). I noticed if I use the console in AWS the call to ExecuteStatement returns a response that has a NextPageToken field. I assume this is what would be used for paing (like Google BigQuery or Azure Cosmos DB). Is this something that is on the roadmap to be implemented in the driver?

Remove non-pooled driver.

The initial goal of having non-pooled driver was to allow the users to use a custom connection pooling library. But having a non-pooled driver has presented couple of problems , in terms of customer experience:

  1. Customers get confused while choosing the pooled or non-pooled implementation, especially when we don’t have a clear documentation addressing this specifically and we recommend using pooled driver.

  2. There is nothing that the non-pooled driver can do better than pooled driver and there exists no reason from a customer’s perspective to use a non-pooled driver version. The need to use a connection pooling library while we offer pooled driver seems redundant.

Avoid blocking on asynchronous code and use async all the way

The Session class block on asynchronous code. This is ineffective for high demand web apps.

The symptom of this is the usage of calls like GetAwaiter().GetResult(). This blocks the calling thread until the response is received. The optimal behavior is to free the calling thread to handle other requests and once a response comes in any thread can continue the initial execution.

So instead of

private SendCommandResponse SendCommand(SendCommandRequest request)
        {
            request.SessionToken = this.sessionToken;
            this.logger.LogDebug("Sending request: {}", request);
            return this.SessionClient.SendCommandAsync(request).GetAwaiter().GetResult();
        }

There should be something like

 private async Task<SendCommandResponse> SendCommand(SendCommandRequest request)
        {
            request.SessionToken = this.sessionToken;
            this.logger.LogDebug("Sending request: {}", request);
            return await this.SessionClient.SendCommandAsync(request);
        }

This change will propagate through the code base, so for example, StartTransaction also should not block, so on.

Update AWSSDK.QLDBSession to v3.5

Hi guys, we are looking at upgrading our AWS SDKs to 3.5, however this package uses AWSSDK.QLDBSession 3.3 and subsequent dependencies are preventing the update.

We can get around the upgrade by manually referencing AWSSDK.Core v3.5, however that generates a lot of warnings.

Is it possible to update AWSSDK.QLDBSession to 3.5? Thanks in advance.

Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE and Execute_UpdateSameRecordAtSameTime_ThrowsOccException tests are failing on f45217f

Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE

  1. Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE
    Duration: 438 ms

    1. Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE (Amazon.QLDBSession.Model.InvalidSessionException: invalid session
      at Moq.SequenceSetup.ExecuteCore(Invocation invocation)
      at Moq.Setup.Execute(Invocation invocation)
      at Moq.FindAndExecuteMatchingSetup.Handle(Invocation invocation, Mock mock)
      at Moq.Mock.Moq.IInterceptor.Intercept(Invocation invocation)
      at Moq.CastleProxyFactory.Interceptor.Intercept(IInvocation invocation)
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at Castle.Proxies.SessionProxy.ExecuteStatement(String txnId, String statement, List1 parameters) at Amazon.QLDB.Driver.Transaction.Execute(String statement, List1 parameters) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\transaction\Transaction.cs:line 163
      at Amazon.QLDB.Driver.Transaction.Execute(String statement) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\transaction\Transaction.cs:line 139
      at Amazon.QLDB.Driver.TransactionExecutor.Execute(String statement) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\transaction\TransactionExecutor.cs:line 65
      at Amazon.QLDB.Driver.Tests.QldbDriverTests.<>c__DisplayClass16_0.<Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE>b__4(TransactionExecutor txn) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver.Tests\QldbDriverTests.cs:line 357
      at Amazon.QLDB.Driver.QldbSession.Execute[T](Func`2 func) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\QldbSession.cs:line 117,False)
      Duration: 377 ms

    2. Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE (Amazon.QLDB.Driver.QldbTransactionException: QLDB Transaction Exception.
      ---> System.Exception: Exception of type 'System.Exception' was thrown.
      at Amazon.QLDB.Driver.RetryHandler.RetriableExecute[T](Func1 func, RetryPolicy retryPolicy, Action newSessionAction, Action nextSessionAction, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\retry\RetryHandler.cs:line 62
      at Amazon.QLDB.Driver.SessionPool.Execute[T](Func2 func, RetryPolicy retryPolicy, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\SessionPool.cs:line 64
      at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func, RetryPolicy retryPolicy, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 223
      at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func, RetryPolicy retryPolicy) in ..\\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 197 at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 144
      at Amazon.QLDB.Driver.Tests.QldbDriverTests.Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE(Exception exception, Boolean expectThrow) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver.Tests\QldbDriverTests.cs:line 357
      --- End of inner exception stack trace ---
      at Amazon.QLDB.Driver.QldbSession.Execute[T](Func2 func) in ..\\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\QldbSession.cs:line 147 at Amazon.QLDB.Driver.SessionPool.<>c__DisplayClass8_01.b__0() in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\SessionPool.cs:line 65
      at Amazon.QLDB.Driver.RetryHandler.RetriableExecute[T](Func1 func, RetryPolicy retryPolicy, Action newSessionAction, Action nextSessionAction, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\retry\RetryHandler.cs:line 51,False)
      Duration: 14 ms

    Message:
    Assert.IsTrue failed.
    Stack Trace:
    QldbDriverTests.Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE(Exception exception, Boolean expectThrow) line 361

    1. Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE (Amazon.QLDB.Driver.QldbDriverException: generic
      at Amazon.QLDB.Driver.RetryHandler.RetriableExecute[T](Func1 func, RetryPolicy retryPolicy, Action newSessionAction, Action nextSessionAction, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\retry\RetryHandler.cs:line 62
      at Amazon.QLDB.Driver.SessionPool.Execute[T](Func2 func, RetryPolicy retryPolicy, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\session\SessionPool.cs:line 64
      at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func, RetryPolicy retryPolicy, Action1 retryAction) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 223
      at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func, RetryPolicy retryPolicy) in ..\\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 197 at Amazon.QLDB.Driver.QldbDriver.Execute[T](Func2 func) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver\driver\QldbDriver.cs:line 144
      at Amazon.QLDB.Driver.Tests.QldbDriverTests.Execute_ExceptionOnExecute_ShouldOnlyRetryOnISEAndTAOE(Exception exception, Boolean expectThrow) in ..\amazon-qldb-driver-dotnet\Amazon.QLDB.Driver.Tests\QldbDriverTests.cs:line 357,True)
      Duration: 6 ms

Execute_UpdateSameRecordAtSameTime_ThrowsOccException

Assert.AreEqual failed. Expected:<Amazon.QLDBSession.Model.OccConflictException>. Actual:<Amazon.Runtime.Internal.HttpErrorResponseException>.

Possible issue with Microsoft.Extensions.Logging v5 in release 1.1.0

Hi guys,

There is a possible issue with using the Microsoft.Extensions.Logging package v5 in https://github.com/awslabs/amazon-qldb-driver-dotnet/blob/master/Amazon.QLDB.Driver/Amazon.QLDB.Driver.xml. In my case, after upgrading to Amazon.QLDB.Driver v1.1.0 I get compiler errors:

1>D:\SomeProject\Project.csproj : error NU1605: Detected package downgrade: Microsoft.Extensions.DependencyInjection from 5.0.0 to 3.1.11. Reference the package directly from the project to select a different version. 
1>D:\SomeProject\Project.csproj : error NU1605: Project -> Amazon.QLDB.Driver 1.1.0 -> Microsoft.Extensions.Logging 5.0.0 -> Microsoft.Extensions.DependencyInjection (>= 5.0.0) 
1>D:\SomeProject\Project.csproj : error NU1605: Project -> Microsoft.Extensions.DependencyInjection (>= 3.1.11)

My code runs on AWS Lambda .NET 3.1 run time and I don't yet have the option of using .NET 5. I am not sure how best to solve this problem, but for now I will stay on Amazon.QLDB.Driver 1.0.1

Unable to use Amazon.QLDB.Driver with other AWSSDK.* packages

Hi,

I am unable to install the latest version Amazon.QLDB.Driver due to a conflict with AWSSDK.Core (>= 3.5.2.9 && < 3.6.0).

Steps to replicate:

  1. Create a new .Net Class Library project
  2. Add (for example) latest version of AWSSDK.XRay nuget package
  3. Add latest version of Amazon.QLDB.Driver nuget package

You'll get a failure from Package Manager:

Restoring packages for D:\source\repos\ClassLibrary2\ClassLibrary2\ClassLibrary2.csproj...
NU1107: Version conflict detected for AWSSDK.Core. Install/reference AWSSDK.Core 3.7.0.10 directly to project ClassLibrary2 to resolve this issue. 
 ClassLibrary2 -> AWSSDK.XRay 3.7.0.9 -> AWSSDK.Core (>= 3.7.0.10 && < 3.8.0) 
 ClassLibrary2 -> Amazon.QLDB.Driver 1.2.0 -> AWSSDK.QLDBSession 3.5.2 -> AWSSDK.Core (>= 3.5.2.9 && < 3.6.0).
Package restore failed. Rolling back package changes for 'ClassLibrary2'.
Time Elapsed: 00:00:00.4196905
========== Finished ==========

I think AWSSDK.QLDBSession might need to be bumped up to a higher version. Happy to crate a PR....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.