🐛 Bug Description
What happened?
Upgraded AWS SDK to V4 and Localstack.Client / LocalStackClient.Extensions to 2.0. When setting useLocalStack true everything works fine. When setting useLocalStack false I get error saying it cannot find the constructor.
What did you expect to happen?
Both useLocalStack true and useLocalStack false should work.
🔄 Steps to Reproduce
- Set useLocalStack to false in appsettings.json
- dotnet run
[Minimal code example:]
(https://github.com/blandis-turnberrysolutions/localstack-client-extensions-repro)
📋 Environment Information
LocalStack.Client Version:
LocalStack Information:
- LocalStack Version:4.12.0
- LocalStack Image: localstack/localstack:4.12.0
- LocalStack Services Used: S3, SQS, EventBridge
.NET Information:
- .NET Version: 10.0.302
- Operating System: MacOS 26.6
- IDE/Editor: VS Code
AWS SDK Information:
- AWS SDK Version: 4.0
- Services: S3, SQS, EventBridge
🔍 Additional Context
Configuration (Optional):
// Your LocalStack configuration (appsettings.json snippet)
{
"LocalStack": {
"UseLocalStack": true,
"Session": {
"RegionName": "eu-central-1"
},
"Config": {
"LocalStackHost": "localhost.localstack.cloud",
"EdgePort": 4566
}
},
"AWS": {
"Profile": "<test>",
"Region": "us-east-1"
}
}
Error Messages/Stack Traces:
Unhandled exception. LocalStack.Client.Extensions.Exceptions.LocalStackClientConfigurationException: ClientFactory<T> missing constructor with AWSOptions parameter.
at LocalStack.Client.Extensions.AwsClientFactoryWrapper.CreateServiceClient[TClient](IServiceProvider provider, AWSOptions awsOptions)
at LocalStack.Client.Extensions.ServiceCollectionExtensions.<>c__DisplayClass12_0`1.<GetServiceFactoryDescriptor>b__0(IServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
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.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
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.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Program.Main(String[] args) in /Users/bradleylandis/development/aws-test/Program.cs:line 30
at Program.<Main>(String[] args)
✅ Checklist
🐛 Bug Description
What happened?
Upgraded AWS SDK to V4 and Localstack.Client / LocalStackClient.Extensions to 2.0. When setting useLocalStack true everything works fine. When setting useLocalStack false I get error saying it cannot find the constructor.
What did you expect to happen?
Both useLocalStack true and useLocalStack false should work.
🔄 Steps to Reproduce
[Minimal code example:]
(https://github.com/blandis-turnberrysolutions/localstack-client-extensions-repro)
📋 Environment Information
LocalStack.Client Version:
LocalStack Information:
.NET Information:
AWS SDK Information:
🔍 Additional Context
Configuration (Optional):
Error Messages/Stack Traces:
✅ Checklist