Blog Post

SQL Server Blog
1 MIN READ

Released: Microsoft.Data.SqlClient 5.2 Preview 2

DavidEngelMS's avatar
DavidEngelMS
Icon for Microsoft rankMicrosoft
Jun 09, 2023

Microsoft.Data.SqlClient 5.2 Preview 2 has been released. This release contains improvements and updates to the Microsoft.Data.SqlClient data provider for SQL Server.

Our plan is to provide GA releases twice a year with two or three preview releases in between. This cadence should provide time for feedback and allow us to deliver features and fixes in a timely manner. This second 5.2 preview includes fixes and changes over the previous preview release.

 

Added

  • Added new property RowsCopied64 to SqlBulkCopy. #2004

Fixed

  • Fixed socket synchronization issue during connect in managed SNI. #1029
  • Fixed issue with SqlConnectionStringBuilder property indexer not supporting non-string values. #2018

Changed

 

For the full list of changes in Microsoft.Data.SqlClient 5.2 Preview 2, please see the Release Notes.

 

To try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application and pick the 5.2 preview 2 version.

 

We appreciate the time and effort you spend checking out our previews. It makes the final product that much better. If you encounter any issues or have any feedback, head over to the SqlClient GitHub repository and submit an issue.

 

David Engel

Published Jun 09, 2023
Version 1.0
  • Data_Juggler's avatar
    Data_Juggler
    Copper Contributor

    I have this outstanding issue with Microsoft.Data.SqlClient. I cannot build any installer, and have a problem publishing one of my Blazor sites because the installed version is 5.1.1, but I get the error:

     

    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.
    File name: 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
    at DataAccessComponent.DataManager.DataConnector.get_ConnectionString()
    at ApplicationLogicComponent.DataBridge.DataBridgeManager.PerformDataOperation(String methodName, String objectName, DataOperationMethod dataMethod, List`1 parameters) in C:\Projects\Blazor.PixelDatabase\Data\ApplicationLogicComponent\DataBridge\DataBridgeManager.cs:line 119System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.
    File name: 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
    at DataAccessComponent.DataManager.DataConnector.get_ConnectionString()
    at ApplicationLogicComponent.DataBridge.DataBridgeManager.PerformDataOperation(String methodName, String objectName, DataOperationMethod dataMethod, List`1 parameters) in C:\Projects\Blazor.PixelDatabase\Data\ApplicationLogicComponent\DataBridge\DataBridgeManager.cs:line 119

     

    The file is in the bin directory, and it works in Visual Studio on my machine and via Visual Studio on my VM. Via IIS, this one project gives me this error. I had to add logging to figure this out.

     

    Here is the issue I created earlier this year

     

    https://github.com/dotnet/SqlClient/issues/1945

     

    This issue was created on March 6.

     

    Today, since I still can't solve this problem 4.5 months later, I decided to try Microsoft.Data.SqlClient 5.2.x preview. I installed the project, and it works via Visual Studio on my machine. I opened the file, and it still lists the File Version as 5.0.0.

     

    Is there a reason you do not update the File Version with the package version? I have 3 opensource projects I can't build an installer for, and one Blazor site isn't working. I even tried copying Microsoft.Data.SqlClient from one of the working projects on the same VM to no avail.

     

    It works in Visual Studio, so something in Visual Studio is able to resolve this issue when a Windows user is present. When running via IIS, or in any of my installer packages made with Advanced Installer, I get the above error stating 5.0.0. 

     

    Please update the File Version, it only takes 5 seconds to do, or tell me how to resolve this error.

     

    Thank you