atc-net / atc-cosmos Goto Github PK
View Code? Open in Web Editor NEWLibrary for configuring containers in Cosmos and providing an easy way to read and write document resources.
Home Page: https://atc-net.github.io/repository/atc-cosmos
Library for configuring containers in Cosmos and providing an easy way to read and write document resources.
Home Page: https://atc-net.github.io/repository/atc-cosmos
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'.```
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.