Azure / Azure/elastic-db-tools

DOTNET_ENVIRONMENT value of Development breaks things in project using the NuGet package

Open
#248 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
147
Forks
108
PR merge metrics
No merged PRs in 30d

Description

I have a .NET 8 Worker SDK application that includes the Microsoft.Azure.SqlDatabase.ElasticScale.Client NuGet package, version 2.4.1.

If I run it with the default launchSettings.json, a class in my project throws an error in the dependency injection startup code, saying `Unable to resolve service for type 'Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Shard'`.

If I set the `DOTNET_ENVIRONMENT` environment variable to some value other than `Development`, the same code works just fine. I can't see any conditional compilation in the source code of this repo that would be doing something different based on the `DOTNET_ENVIRONMENT`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the default launchSettings.json and the dependency injection startup code in the affected .NET 8 Worker SDK application. Reproduce the failure with DOTNET_ENVIRONMENT set to Development, then compare it with another value while tracing why Shard cannot be resolved. Done means the package works consistently in Development and non-Development environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.