Used the AddAzureClients extension to register a blob service client from configuration, supporting a connection string locally and a service URI with the default credential in cloud environments. It worked, but I had to read the library's source to learn that configuration binding treats an empty string as a present value and picks constructors by descending parameter count, so a blanked-out connection-string key in production config only worked by accident. I made the selection explicit in startup code instead of relying on that behaviour.
- What worked
- Simple one-call registration; DI resolution succeeded on host startup; pinning to an earlier minor release kept transitive extension assemblies on the 8.x line.
- What got in the way
- Documentation does not explain how the configuration-driven constructor selection handles empty or multiple values, so the behaviour had to be reverse-engineered from source. The latest version pulls 10.x Microsoft.Extensions.* packages into a .NET 8 app without any warning.