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

Native SNI Improvements #570

Merged
merged 15 commits into from
May 21, 2020
Merged

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented May 20, 2020

This PR brings below changes:

  • For .NET Core and .NET Standard targets (on Windows)
    We now introduce Microsoft.Data.SqlClient.SNI.runtime as new dependency to replace the old runtime.native.System.Data.SqlClient.SNI. Below platforms are supported by Microsoft.Data.SqlClient.SNI.runtime:

    • ARM
    • ARM64
    • x64
    • x86
  • For .NET Framework targets
    The SNI.dll files previously downloaded to x64 and x86 folders are now renamed to Microsoft.Data.SqlClient.SNI.x64.dll and Microsoft.Data.SqlClient.SNI.x86.dll to support respective platforms.

  • Test Expansions
    The SqlClient test suite now allows executing same tests for below reference types:

    • Project (default)
      • Build and run tests with Microsoft.Data.SqlClient as Project Reference
    • Package
      • Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
    • NetStandard
      • Build and run tests with Microsoft.Data.SqlClient as Project Reference via .NET Standard Library to validate .NET Standard support.
    • NetStandardPackage
      • Build and run tests with Microsoft.Data.SqlClient as Package Reference via .NET Standard Library to validate .NET Standard support with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.

@cheenamalhotra cheenamalhotra added ✔️ Tests Identifier for test related changes 📄 Native SNI labels May 20, 2020
@Wraith2
Copy link
Contributor

Wraith2 commented May 21, 2020

Below platforms are supported by Microsoft.Data.SqlClient.SNI.runtime

It might be worth noting at release that this is just for windows os, all non-windows will use managed.

@cheenamalhotra cheenamalhotra merged commit 16faadc into dotnet:master May 21, 2020
@IanKemp
Copy link

IanKemp commented Jun 3, 2020

Will this be available in both the System.Data.SqlClient (legacy) and Microsoft.Data.SqlClient packages, or only the latter?

@cheenamalhotra
Copy link
Member Author

Hi @IanKemp

These changes are applicable only to Microsoft.Data.SqlClient latest preview (2.0.0-preview4) and future versions.

@irontoby
Copy link

@cheenamalhotra sorry for the late response on this but can you confirm that with the switch to this package, that using Microsoft.Data.SqlClient 2.0.0 or later will no longer require the Microsoft Visual C++ Redistributable to be installed on Windows? It looks like that's the case but I can't find any documentation on that specifically.

@cheenamalhotra
Copy link
Member Author

Hi @irontoby

We removed the dependency notes from Microsoft.Data.SqlClient NuGet v1.1.1 onwards. But since the SNI is closed source and is made available to public with driver releases (as it's not meant for direct reference), we probably didn't publish SNI related changes.
I will discuss internally to see how can we make it more visible.

@irontoby
Copy link

@cheenamalhotra thanks! Understand your reasoning, but this has definitely been a bit of a frustrating experience for us. The need for having to install the redistributable was not obvious at first, since we weren't even using Microsoft.Data.SqlClient directly; we upgraded to EF Core 3.0 which depends on it.

So it worked fine on devs' machines but broke on the server & took a good while to figure out what was going wrong. So then we had to update our provisioning tools to install that runtime on all servers.

Anyway thanks for the feedback; based on this it sounds like we can remove the runtime from our update process as long as we directly reference Microsoft.Data.SqlClient 2.0 or higher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✔️ Tests Identifier for test related changes 📄 Native SNI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants