dotnet / dotnet/SqlClient

Microsoft.Data.SqlClient is not compatible with AssemblyLoadContext unloading

Open
#1,687 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 19h
Merged PRs (30d)
72

Description

See https://github.com/dotnet/runtime/issues/31377 for context. The fundamental issue is that unloadability is based on GC references, so SqlClient containing a strong references via event handlers and similar. The suggested fix is that for callbacks like the TimerCallback in Microsoft.Data.SqlClient.SqlConnectionFactory, support for listening to the Unload event could be added and these roots could be cleared, so that the app could be unloaded.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.