Git Product home page Git Product logo

atc-cosmos's Issues

Breaking change between Atc.Cosmos v. 1.0.131 and 1.0.139

After updating Atc.Cosmos package to v 1.0.139, the below error and therefore breaking change occurred when calling the following code:

builder.Services.AddSingleton(s =>
{
    var options = s.GetRequiredService<IOptions<CosmosOptions>>().Value;

    return RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
        ? new CosmosClient(options.AccountEndpoint, options.AccountKey, new CosmosClientOptions { ConnectionMode = ConnectionMode.Gateway })
        : new CosmosClient(options.AccountEndpoint, options.AccountKey);
});

Is this intended? Should versions be bumped instead?

Something needs to be added to the README so we know how to recover from this error.

System.AggregateException
  HResult=0x80131500
  Message=Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Atc.Cosmos.Internal.ICosmosContainerProvider Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.CosmosContainerProvider': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosContainerProvider'.) (Error while validating the service descriptor 'ServiceType: Atc.Cosmos.Internal.ICosmosInitializer Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.CosmosInitializer': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosInitializer'.) (Error while validating the service descriptor 'ServiceType: Atc.Cosmos.ICosmosReaderFactory Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.CosmosReaderFactory': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosContainerProvider'.) (Error while validating the service descriptor 'ServiceType: Atc.Cosmos.ICosmosWriterFactory Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.CosmosWriterFactory': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosContainerProvider'.) (Error while validating the service descriptor 'ServiceType: Microsoft.Extensions.Hosting.IHostedService Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.StartupInitializationJob': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosInitializer'.)
  Source=Microsoft.Extensions.DependencyInjection
  StackTrace:
   at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection1 serviceDescriptors, ServiceProviderOptions options)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
   at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
   at Program.<Main>$(String[] args) in D:\Code\Api\Program.cs:line 71

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
InvalidOperationException: Error while validating the service descriptor 'ServiceType: Atc.Cosmos.Internal.ICosmosContainerProvider Lifetime: Singleton ImplementationType: Atc.Cosmos.Internal.CosmosContainerProvider': Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosContainerProvider'.

Inner Exception 2:
InvalidOperationException: Unable to resolve service for type 'Atc.Cosmos.Internal.ICosmosContainerRegistry' while attempting to activate 'Atc.Cosmos.Internal.CosmosContainerProvider'.```

Support updated coding standards

Update repo to follow updated folder standard included in PR #39 in atc-coding-rules.

Changes will include use of Directory.Build.props and remove any obsolete files and folders.

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.