Open eerhardt opened 1 month ago
Exception you get when using the 3.0.0
version of MongoDB.Driver
with the Aspire integration:
System.IO.FileNotFoundException: Could not load file or assembly 'MongoDB.Driver.Core, Version=2.29.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321'. The system cannot find the file specified.
File name: 'MongoDB.Driver.Core, Version=2.29.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321'
at Microsoft.Extensions.Hosting.AspireMongoDBDriverExtensions.CreateMongoClient(IServiceProvider serviceProvider, String connectionName, MongoDBSettings mongoDbSettings, Action`1 configureClientSettings)
at Microsoft.Extensions.Hosting.AspireMongoDBDriverExtensions.<>c__DisplayClass5_0.<AddMongoClient>b__0(IServiceProvider sp) in /_/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs:line 113
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at lambda_method2(Closure, Object, HttpContext)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Is the plan to take #6381 for 9.0 GA? I'd think we should right?
Is the plan to take #6381 for 9.0 GA? I'd think we should right?
Yes, that was my plan. So people don't use the Aspire library with the 3.0.0 version of MongoDB.Driver.
Is the plan to take #6381 for 9.0 GA? I'd think we should right?
Yes, that was my plan. So people don't use the Aspire library with the 3.0.0 version of MongoDB.Driver.
Why?
I would understand if below 3.0.0 would not be possible with Aspire 9.0, but not this. So, I need to choose between Aspire or MongoDB 3.0.0?
@JamesKovacs, MongoDB should provide a MongoDB.Driver.Core package with type forwarding to ease migration to MongoDb.Driver 3.0.0. As it is, it will break a lot of libraries and applications and delay (or prevent) the adoption of MongoDb.Driver 3.0.0. And out-of-the-box OpenTelemetry support.
Yes, that was my plan. So people don't use the Aspire library with the 3.0.0 version of MongoDB.Driver.
Why?
Because it doesn't work. See the above exception.
https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.0.0
We should follow the same approach as outlined in RabbitMQ.Client v7 breaks Aspire.RabbitMQ.Client component (dotnet/aspire#3956)
cc @sebastienros @radical @joperezr @DamianEdwards