Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcement: System.Data.SqlClient package is now deprecated #322

Open
David-Engel opened this issue Aug 22, 2024 · 0 comments
Open

Announcement: System.Data.SqlClient package is now deprecated #322

David-Engel opened this issue Aug 22, 2024 · 0 comments

Comments

@David-Engel
Copy link

David-Engel commented Aug 22, 2024

This issue is a locked mirror of dotnet/SqlClient#2778. See that issue for discussion.

We announced Microsoft.Data.SqlClient in the first half of 2019 and shipped the first stable package later that year. That release coincided with .NET Core 3.0. We’ve been developing Microsoft.Data.SqlClient in the dotnet/SqlClient repo since that time, over the last five years. It’s now time to start the deprecation process for the System.Data.SqlClient package. We plan to take a staged process to deprecation, with the intent to align support changes and associated code transition activities between these libraries to natural migration points between .NET major versions.

All System.Data.SqlClient users are encouraged to transition to Microsoft.Data.SqlClient. We offer improvements and significantly higher support via the Microsoft.Data.SqlClient package.

Plan

We intend to deprecate the System.Data.SqlClient package in stages.

  • Before .NET 9 GA:
    • Publish a new 5.0.0 package, including the following changes.
    • Remove support for .NET 7 and earlier and .NET Framework 4.6.1 and earlier.
    • Publish assets for the following target frameworks: .NET 8, .NET Framework 4.6.2, .NET Standard 2.0.
    • Add Obsolete attributes to .NET 8 and .NET Standard 2.0 assets. This will generate new warnings for .NET 8+ and .NET Standard users.
    • Continue to offer security servicing, for .NET 8, and .NET Framework 4.6.2+ application users.
  • After .NET 9 GA:
    • No change
    • We will not support this package for .NET 9+ application users.
  • After .NET 8 EOL:
    • Remove support for .NET 8 users (the .NET 8 library will be removed).
    • Maintain support for .NET Framework 4.6.2+ users.
    • Security servicing will be provided via .NET Framework, not the package, at that point.
    • We do not expect to update the package again after this point.
    • We will not mark the package as deprecated since it will only support .NET Framework users with an implementation provided by .NET Framework.

We will remove support in the package for unsupported .NET and .NET Framework versions at various stages of this deprecation plan. Users affected by those changes are encouraged to move to a supported .NET or .NET Framework version and to adopt the Microsoft.Data.SqlClient package.

We decided to remove support for .NET 6 since it will go EOL shortly after this new package is released, even though .NET 6 will still be supported at the time. Publishing a .NET 8 library significantly simplifies the plan, both in terms of what we will deliver and what we need to explain.

For .NET dates, see .NET Releases. .NET 9 will GA in November of this year. .NET 8 will go EOL in November, 2026.

The current package version of System.Data.SqlClient is 4.8.6, at the time of writing. These changes will be made with a 5.0.0 version and later.

Note: This deprecation doesn’t apply to the System.Data.SqlClient namespace in .NET Framework.

Microsoft.Data.SqlClient

Daily downloads of Microsoft.Data.SqlClient on nuget.org are nearing 50% higher than System.Data.SqlClient. We expect the gap in usage between the two libraries will continue to increase. Microsoft.Data.SqlClient is the best library we offer to access SQL Server.

We are committed to providing high-quality, performance-driven, and secure data access technologies. We strongly encourage users to transition to Microsoft.Data.SqlClient. It is actively maintained and supports the latest SQL Server features.

How to migrate?

Add the NuGet package to your project, then update your references and using statements. Our porting cheat sheet provides a step-by-step set of changes you may need to make.

  1. Update your project references: Replace references to System.Data.SqlClient with Microsoft.Data.SqlClient.
  2. Modify your using statements: Update your using statements in your code files from System.Data.SqlClient to Microsoft.Data.SqlClient.
  3. Test your application: Thoroughly test your application to ensure that it works as expected after the migration.

We also plan to support semi-automatic migration via .NET Upgrade Assistant.

Support & Feedback: If you have any questions or need assistance with the migration, please reach out through our official support channels or join the discussion on our GitHub repository.

Resources

@dotnet dotnet locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants