You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LaunchDarkly .NET SDK using MAUI artifacts on non-MAUI backend service application #338
Describe the bug
We are an non-MAUI app (part system service backend, part WPF UI frontend.) After we migrated from our 4.0.0 version of LD to 5.9.0 we noticed that the SDK stopped recognizing that the internet came back if you started the app without internet and then turned it back on. We have made a simple demonstrator console app and could reproduce this effect.
Observed behaviour
polled NetworkAccess flips to Internet, but ConnectivityChanged never fires; DataSourceStatus stays NetworkUnavailable; evaluations keep returning the fallback. Never recovers.
Expected behavior
(similar to 4.0.0): reconnects, DataSourceStatus -> Valid, real value returned.
SDK version
5.9.0 and 5.9.6 (but all that use MAUI libraries will be affected)
Language version, developer tools
.NET 9.0.
OS/platform
Windows 11
Additional context (code example used)
var config = Configuration.Builder(mobileKey, ConfigurationBuilder.AutoEnvAttributes.Disabled)
.Persistence(Components.NoPersistence).Build();
var client = LdClient.Init(config, ctx, TimeSpan.FromSeconds(10)); // network is OFF here
client.DataSourceStatusProvider.StatusChanged += (s, st) => Log($"status -> {st.State}");
client.FlagTracker.FlagValueChanged += (s, e) => Log($"FlagValueChanged {e.Key} -> {e.NewValue}");
// then poll every 2s: client.DataSourceStatusProvider.Status.State and client.BoolVariation(flag,false)
// turn network back ON mid-run and observe.
I would be very appreciative if the MAUI requirement was dropped from this SDK. Most .NET applications relying on Launch Darkly are not running MAUI, or even any UI layer at all and are unable to use Launch Darkly at all due to this. Also apologizes I marked it as package:sdk/server but you don't have a client package option available in the list.
Yep forcing the fallback to netstandard libraries seemed to have done the trick thanks. Can you vouch for this workaround, we have thousands of devices in our fleet and if unsure I would rather fallback to pre MAUI version, which seems to be versions older than 5.0.0.
FYI I think you are doing it in the workaround as well but maybe if it helps we had to do this as well which is similar:
<!--LaunchDarkly.ClientSdk5.x transitively pulls Microsoft.Maui.Essentials, whose MSBuild
targets activate MSIX/MRT/PRI resource tooling on any project targeting net*-windows.That tooling then demands RuntimeIdentifiers, SkipGetTargetFrameworkProperties on
C++/CLI ProjectReferences, and AppxGeneratePriEnabled/EnableCoreMrtTooling opt-outs
throughout the solution. ExcludeAssets on build;buildTransitive keeps LD's runtime
DLLs but blocks the MAUI build-time infrastructure from leaking in.--><PackageReference Include="LaunchDarkly.ClientSdk"Version="5.9.0"><ExcludeAssets>build;buildTransitive</ExcludeAssets></PackageReference>
Yes, our intent is to support Net Standard implementations so that non-UI applications can continue to use LaunchDarkly. The Net Standard classes in the SDK assume there is connectivity to avoid issues.
This workaround only became necessary in 5.x due to the package resolution ambiguity. We will likely revise the package resolution in our next major version.
I think ExcludeAssets="Compile;Runtime;BuildTransitive" /> is the minimum necessary, but All may also work.
Thanks will talk with the team, but most likely upgrade in that case. Feel free to close this ticket or leave it up for others who may stumble upon this as the existing open issues none seem to behave or describe a similar issues, it's mostly compilation issues.
changed the title [-]LaunchDarkly .NET SDK has broken internet availability detection for non-MAUI apps[/-][+]LaunchDarkly .NET SDK choosing MAUI build targets on non-MAUI backend service application[/+]on Sep 1, 2026
changed the title [-]LaunchDarkly .NET SDK choosing MAUI build targets on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK project choosing MAUI targets on non-MAUI backend service application[/+]on Sep 1, 2026
changed the title [-]LaunchDarkly .NET SDK project choosing MAUI targets on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK project choosing MAUI artifacts on non-MAUI backend service application[/+]on Sep 1, 2026
changed the title [-]LaunchDarkly .NET SDK project choosing MAUI artifacts on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK using MAUI artifacts on non-MAUI backend service application[/+]on Sep 1, 2026
Activity
tanderson-ld commentedon Aug 31, 2026
Hi @BorderKeeper , thank you for reaching out. Does this workaround work for you? If necessary, I can help find versions.
BorderKeeper commentedon Aug 31, 2026
Yep forcing the fallback to netstandard libraries seemed to have done the trick thanks. Can you vouch for this workaround, we have thousands of devices in our fleet and if unsure I would rather fallback to pre MAUI version, which seems to be versions older than 5.0.0.
FYI I think you are doing it in the workaround as well but maybe if it helps we had to do this as well which is similar:
tanderson-ld commentedon Aug 31, 2026
Yes, our intent is to support Net Standard implementations so that non-UI applications can continue to use LaunchDarkly. The Net Standard classes in the SDK assume there is connectivity to avoid issues.
This workaround only became necessary in 5.x due to the package resolution ambiguity. We will likely revise the package resolution in our next major version.
I think
ExcludeAssets="Compile;Runtime;BuildTransitive" />is the minimum necessary, but All may also work.BorderKeeper commentedon Sep 1, 2026
Thanks will talk with the team, but most likely upgrade in that case. Feel free to close this ticket or leave it up for others who may stumble upon this as the existing open issues none seem to behave or describe a similar issues, it's mostly compilation issues.
[-]LaunchDarkly .NET SDK has broken internet availability detection for non-MAUI apps[/-][+]LaunchDarkly .NET SDK choosing MAUI build targets on non-MAUI backend service application[/+]tanderson-ld commentedon Sep 1, 2026
Thank you for reaching out. I am leaving this issue open to help others that may run into this issue find the above workaround.
[-]LaunchDarkly .NET SDK choosing MAUI build targets on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK project choosing MAUI targets on non-MAUI backend service application[/+][-]LaunchDarkly .NET SDK project choosing MAUI targets on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK project choosing MAUI artifacts on non-MAUI backend service application[/+][-]LaunchDarkly .NET SDK project choosing MAUI artifacts on non-MAUI backend service application[/-][+]LaunchDarkly .NET SDK using MAUI artifacts on non-MAUI backend service application[/+]