From dbddac8457f20a6b24fae020585bfae7f6e39ca8 Mon Sep 17 00:00:00 2001
From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
Date: Thu, 12 Mar 2026 14:43:28 -0300
Subject: [PATCH 1/6] Moved the Logging package from Extensions to Internal.
---
.../onebranch-pipeline-design.instructions.md | 40 +++++++++----------
.github/prompts/release-notes.prompt.md | 4 +-
Directory.Packages.props | 2 +-
build.proj | 2 +-
build2.proj | 2 +-
doc/apps/AzureAuthentication/README.md | 2 +-
.../jobs/pack-logging-package-ci-job.yml | 2 +-
.../onebranch/jobs/build-akv-official-job.yml | 2 +-
.../build-signed-sqlclient-package-job.yml | 2 +-
.../onebranch/sqlclient-non-official.yml | 4 +-
.../onebranch/sqlclient-official.yml | 4 +-
.../onebranch/stages/build-stages.yml | 4 +-
.../onebranch/stages/release-stages.yml | 4 +-
.../stages/build-logging-package-ci-stage.yml | 6 +--
.../Abstractions/src/Abstractions.csproj | 4 +-
.../Abstractions/src/PackageReadme.md | 2 +-
.../src/SqlAuthenticationProvider.Internal.cs | 1 +
.../ActiveDirectoryAuthenticationProvider.cs | 1 +
.../Azure/src/Azure.csproj | 4 +-
.../Azure/src/PackageReadme.md | 2 +-
.../Logging/src/Logging.csproj | 8 ++--
.../Logging/src/LoggingVersions.props | 0
.../Logging/src/PackageReadme.md | 10 ++---
.../Logging/src/SqlClientEventSource.cs | 2 +-
src/Microsoft.Data.SqlClient.sln | 6 ++-
.../AzureSqlKeyCryptographer.cs | 1 +
.../AzureKeyVaultProvider/LocalCache.cs | 1 +
...waysEncrypted.AzureKeyVaultProvider.csproj | 4 +-
...qlColumnEncryptionAzureKeyVaultProvider.cs | 1 +
.../src/Microsoft.Data.SqlClient.csproj | 4 +-
.../netfx/src/Microsoft.Data.SqlClient.csproj | 4 +-
.../src/Microsoft.Data.SqlClient.csproj | 4 +-
.../src/Microsoft/Data/Common/AdapterUtil.cs | 1 +
.../DbConnectionOptions.Debug.cs | 1 +
.../DbConnectionString.netfx.cs | 1 +
.../src/Microsoft/Data/DataException.cs | 1 +
.../Data/ProviderBase/DbConnectionInternal.cs | 1 +
...taSourceEnumeratorManagedHelper.netcore.cs | 1 +
...ataSourceEnumeratorNativeHelper.windows.cs | 1 +
.../Connection/SqlConnectionInternal.cs | 1 +
.../ConnectionPool/ChannelDbConnectionPool.cs | 1 +
.../ConnectionPool/DbConnectionPoolGroup.cs | 1 +
.../SqlConnectionPoolGroupProviderInfo.cs | 1 +
.../TransactedConnectionPool.cs | 1 +
.../WaitHandleDbConnectionPool.cs | 1 +
.../SqlClient/Diagnostics/SqlClientMetrics.cs | 1 +
.../Data/SqlClient/LocalAppContextSwitches.cs | 1 +
.../SqlClient/LocalDb/LocalDbApi.windows.cs | 1 +
.../ManagedSni/LocalDB.netcore.windows.cs | 1 +
.../SqlClient/ManagedSni/SniCommon.netcore.cs | 1 +
.../ManagedSni/SniMarsConnection.netcore.cs | 1 +
.../ManagedSni/SniMarsHandle.netcore.cs | 1 +
.../ManagedSni/SniNetworkStream.netcore.cs | 1 +
.../ManagedSni/SniNpHandle.netcore.cs | 1 +
.../SqlClient/ManagedSni/SniPacket.netcore.cs | 1 +
.../SqlClient/ManagedSni/SniProxy.netcore.cs | 1 +
.../ManagedSni/SniSslStream.netcore.cs | 1 +
.../ManagedSni/SniTcpHandle.netcore.cs | 1 +
.../ManagedSni/SslOverTdsStream.netcore.cs | 1 +
.../ManagedSni/SsrpClient.netcore.cs | 1 +
.../SqlClient/Reliability/AppConfigManager.cs | 1 +
.../Reliability/Common/SqlRetryLogic.cs | 1 +
.../Common/SqlRetryLogicProvider.cs | 1 +
.../SqlConfigurableRetryFactory.cs | 1 +
.../SqlConfigurableRetryLogicLoader.cs | 1 +
.../SqlConfigurableRetryLogicManager.cs | 1 +
.../SSPI/NegotiateSspiContextProvider.cs | 1 +
.../SqlClient/SSPI/SspiContextProvider.cs | 1 +
.../SqlAppContextSwitchManager.netcore.cs | 1 +
.../SqlAuthenticationProviderManager.cs | 1 +
.../Microsoft/Data/SqlClient/SqlBulkCopy.cs | 1 +
.../Data/SqlClient/SqlClientEventSource.cs | 3 +-
.../Data/SqlClient/SqlClientLogger.cs | 1 +
.../Data/SqlClient/SqlCommand.NonQuery.cs | 1 +
.../Data/SqlClient/SqlCommand.Reader.cs | 1 +
.../Data/SqlClient/SqlCommand.Scalar.cs | 1 +
.../Data/SqlClient/SqlCommand.Xml.cs | 1 +
.../Microsoft/Data/SqlClient/SqlCommand.cs | 1 +
.../Microsoft/Data/SqlClient/SqlCommandSet.cs | 1 +
.../Microsoft/Data/SqlClient/SqlConnection.cs | 1 +
.../Data/SqlClient/SqlConnectionFactory.cs | 1 +
.../Data/SqlClient/SqlDataAdapter.cs | 1 +
.../Microsoft/Data/SqlClient/SqlDataReader.cs | 1 +
.../Data/SqlClient/SqlDelegatedTransaction.cs | 1 +
.../Microsoft/Data/SqlClient/SqlDependency.cs | 1 +
.../Data/SqlClient/SqlDependencyListener.cs | 1 +
.../Data/SqlClient/SqlDependencyUtils.cs | 1 +
.../src/Microsoft/Data/SqlClient/SqlError.cs | 1 +
.../Data/SqlClient/SqlInternalTransaction.cs | 1 +
.../Data/SqlClient/SqlTransaction.cs | 1 +
.../src/Microsoft/Data/SqlClient/TdsParser.cs | 1 +
.../SqlClient/TdsParserSafeHandles.windows.cs | 1 +
.../Data/SqlClient/TdsParserSessionPool.cs | 1 +
.../TdsParserStateObject.Multiplexer.cs | 1 +
.../Data/SqlClient/TdsParserStateObject.cs | 1 +
.../TdsParserStateObjectFactory.windows.cs | 1 +
.../TdsParserStateObjectManaged.netcore.cs | 1 +
.../TdsParserStateObjectNative.windows.cs | 1 +
.../Data/SqlTypes/SqlFileStream.windows.cs | 1 +
.../Data/SqlTypes/SqlTypeWorkarounds.cs | 1 +
tools/props/Versions.props | 2 +-
tools/specs/Microsoft.Data.SqlClient.nuspec | 8 ++--
102 files changed, 147 insertions(+), 72 deletions(-)
rename src/{Microsoft.Data.SqlClient.Extensions => Microsoft.Data.SqlClient.Internal}/Logging/src/Logging.csproj (93%)
rename src/{Microsoft.Data.SqlClient.Extensions => Microsoft.Data.SqlClient.Internal}/Logging/src/LoggingVersions.props (100%)
rename src/{Microsoft.Data.SqlClient.Extensions => Microsoft.Data.SqlClient.Internal}/Logging/src/PackageReadme.md (88%)
rename src/{Microsoft.Data.SqlClient.Extensions => Microsoft.Data.SqlClient.Internal}/Logging/src/SqlClientEventSource.cs (99%)
diff --git a/.github/instructions/onebranch-pipeline-design.instructions.md b/.github/instructions/onebranch-pipeline-design.instructions.md
index bcae2464a5..1c848e2493 100644
--- a/.github/instructions/onebranch-pipeline-design.instructions.md
+++ b/.github/instructions/onebranch-pipeline-design.instructions.md
@@ -23,11 +23,11 @@ Both pipelines use the **OneBranch (1ES) governed template** infrastructure and
| # | Package | Dependencies |
|---|---------|-------------|
| 1 | `Microsoft.SqlServer.Server` | — |
-| 2 | `Microsoft.Data.SqlClient.Extensions.Logging` | — |
-| 3 | `Microsoft.Data.SqlClient.Extensions.Abstractions` | `Extensions.Logging` |
-| 4 | `Microsoft.Data.SqlClient` | `Extensions.Logging`, `Extensions.Abstractions` |
-| 5 | `Microsoft.Data.SqlClient.Extensions.Azure` | `Extensions.Abstractions`, `Extensions.Logging` |
-| 6 | `Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider` | `SqlClient`, `Extensions.Logging` |
+| 2 | `Microsoft.Data.SqlClient.Internal.Logging` | — |
+| 3 | `Microsoft.Data.SqlClient.Extensions.Abstractions` | `Internal.Logging` |
+| 4 | `Microsoft.Data.SqlClient` | `Internal.Logging`, `Extensions.Abstractions` |
+| 5 | `Microsoft.Data.SqlClient.Extensions.Azure` | `Extensions.Abstractions`, `Internal.Logging` |
+| 6 | `Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider` | `SqlClient`, `Internal.Logging` |
---
@@ -37,7 +37,7 @@ Both pipelines use the **OneBranch (1ES) governed template** infrastructure and
sequenceDiagram
participant T as Trigger / User
participant P as Pipeline Orchestrator
- participant B1a as Job: Build Extensions.Logging
+ participant B1a as Job: Build Internal.Logging
participant B1c as Job: Build SqlServer.Server
participant B1b as Job: Build Extensions.Abstractions
participant B2a as Job: Build SqlClient
@@ -63,18 +63,18 @@ sequenceDiagram
Note over P: Stage 2 — build_abstractions (dependsOn: build_independent)
P->>B1b: Build DLLs → ESRP sign DLLs → Pack → ESRP sign NuGet (Abstractions)
- Note right of B1b: Downloads: Extensions.Logging artifact
+ Note right of B1b: Downloads: Internal.Logging artifact
B1b-->>P: ✅ Signed .nupkg
Note over P: Stage 3 — build_dependent (dependsOn: build_abstractions)
par Stage 3 jobs (parallel)
P->>B2a: Build + ESRP sign + pack SqlClient
- Note right of B2a: Downloads: Extensions.Logging,
Extensions.Abstractions artifacts
+ Note right of B2a: Downloads: Internal.Logging,
Extensions.Abstractions artifacts
B2a-->>P: ✅ Signed .nupkg + .snupkg
and
P->>B2b: Build DLLs → ESRP sign DLLs → Pack → ESRP sign NuGet (Azure)
- Note right of B2b: Downloads: Extensions.Abstractions,
Extensions.Logging artifacts
+ Note right of B2b: Downloads: Extensions.Abstractions,
Internal.Logging artifacts
B2b-->>P: ✅ Signed .nupkg
end
@@ -85,7 +85,7 @@ sequenceDiagram
V-->>P: ✅ Package validation passed
and
P->>B3: Build + ESRP sign + pack AKV Provider
- Note right of B3: Downloads: SqlClient,
Extensions.Logging artifacts
+ Note right of B3: Downloads: SqlClient,
Internal.Logging artifacts
B3-->>P: ✅ Signed .nupkg
end
@@ -116,7 +116,7 @@ The build phase runs automatically on every CI trigger, scheduled run, or manual
| Job Template | Package | Build Target | Condition |
|--------------|---------|--------------|-----------|
-| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Extensions.Logging` | `BuildLogging` / `PackLogging` | `buildAKVProvider OR buildSqlClient` |
+| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Internal.Logging` | `BuildLogging` / `PackLogging` | `buildAKVProvider OR buildSqlClient` |
| `build-signed-csproj-package-job.yml` | `Microsoft.SqlServer.Server` | `PackSqlServer` | `buildSqlServerServer` |
- **`dependsOn`**: none
@@ -128,18 +128,18 @@ The build phase runs automatically on every CI trigger, scheduled run, or manual
| Job Template | Package | Build Target | Artifact Dependencies |
|--------------|---------|--------------|----------------------|
-| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Extensions.Abstractions` | `BuildAbstractions` / `PackAbstractions` | `Extensions.Logging` |
+| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Extensions.Abstractions` | `BuildAbstractions` / `PackAbstractions` | `Internal.Logging` |
- **Stage condition**: `buildSqlClient = true` (entire stage is excluded when false)
- **`dependsOn`**: `build_independent`
-- Downloads `Microsoft.Data.SqlClient.Extensions.Logging.nupkg` (from Stage 1) pipeline artifact
+- Downloads `Microsoft.Data.SqlClient.Internal.Logging.nupkg` (from Stage 1) pipeline artifact
#### Stage 3 — `build_dependent`: Core Packages (depend on Stage 2)
| Job Template | Package | Build Target | Artifact Dependencies |
|--------------|---------|--------------|----------------------|
-| `build-signed-package-job.yml` | `Microsoft.Data.SqlClient` | *(nuspec-based)* | `Extensions.Logging`, `Extensions.Abstractions` |
-| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Extensions.Azure` | `BuildAzure` / `PackAzure` | `Extensions.Abstractions`, `Extensions.Logging` |
+| `build-signed-package-job.yml` | `Microsoft.Data.SqlClient` | *(nuspec-based)* | `Internal.Logging`, `Extensions.Abstractions` |
+| `build-signed-csproj-package-job.yml` | `Microsoft.Data.SqlClient.Extensions.Azure` | `BuildAzure` / `PackAzure` | `Extensions.Abstractions`, `Internal.Logging` |
- **Stage condition**: `buildSqlClient = true` (entire stage is excluded when false)
- **`dependsOn`**: `build_abstractions`
@@ -151,11 +151,11 @@ The build phase runs automatically on every CI trigger, scheduled run, or manual
| Job Template | Package | Artifact Dependencies |
|--------------|---------|----------------------|
-| `build-akv-official-job.yml` | `Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider` | `SqlClient`, `Extensions.Logging` |
+| `build-akv-official-job.yml` | `Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider` | `SqlClient`, `Internal.Logging` |
- **Stage condition**: `buildAKVProvider AND buildSqlClient` (both must be true)
- **`dependsOn`**: `build_dependent`
-- Downloads `Microsoft.Data.SqlClient.nupkg` (from Stage 3) and `Microsoft.Data.SqlClient.Extensions.Logging.nupkg` (from Stage 1) pipeline artifacts
+- Downloads `Microsoft.Data.SqlClient.nupkg` (from Stage 3) and `Microsoft.Data.SqlClient.Internal.Logging.nupkg` (from Stage 1) pipeline artifacts
- Uses separate ESRP signing credentials (`Signing`-prefixed variables from `esrp-variables-v2` group)
### 4.2 Validation Stage — `mds_package_validation`
@@ -200,7 +200,7 @@ The release stage is gated and only executes on demand when at least one release
| Package | Artifact Name | Publish Job |
|---------|---------------|-------------|
| `Microsoft.SqlServer.Server` | `drop_build_independent_build_package_SqlServer` | `publish_SqlServer_Server` |
-| `Microsoft.Data.SqlClient.Extensions.Logging` | `drop_build_independent_build_package_Logging` | `publish_Logging` |
+| `Microsoft.Data.SqlClient.Internal.Logging` | `drop_build_independent_build_package_Logging` | `publish_Logging` |
| `Microsoft.Data.SqlClient.Extensions.Abstractions` | `drop_build_abstractions_build_package_Abstractions` | `publish_Abstractions` |
| `Microsoft.Data.SqlClient` | `drop_build_dependent_build_package_SqlClient` | `publish_SqlClient` |
| `Microsoft.Data.SqlClient.Extensions.Azure` | `drop_build_dependent_build_package_Azure` | `publish_Extensions_Azure` |
@@ -294,7 +294,7 @@ parameters:
default: false
- name: releaseLogging
- displayName: 'Release Microsoft.Data.SqlClient.Extensions.Logging'
+ displayName: 'Release Microsoft.Data.SqlClient.Internal.Logging'
type: boolean
default: false
@@ -443,7 +443,7 @@ APIScan is configured at **both pipeline level and job level**:
| `ob_sdl_apiscan_enabled` | Enable/disable APIScan for this job (`true`) |
| `ob_sdl_apiscan_softwareFolder` | Path to signed DLLs for scanning |
| `ob_sdl_apiscan_symbolsFolder` | Path to PDBs for scanning |
-| `ob_sdl_apiscan_softwarename` | Package name (e.g., `Microsoft.Data.SqlClient.Extensions.Logging`) |
+| `ob_sdl_apiscan_softwarename` | Package name (e.g., `Microsoft.Data.SqlClient.Internal.Logging`) |
| `ob_sdl_apiscan_versionNumber` | Assembly file version |
Each job copies its signed DLLs and PDBs to a package-specific folder under `$(Build.SourcesDirectory)/apiScan//` after ESRP DLL signing, ensuring APIScan analyzes the correct signed binaries for each package.
diff --git a/.github/prompts/release-notes.prompt.md b/.github/prompts/release-notes.prompt.md
index 8c8202ab15..ca03933236 100644
--- a/.github/prompts/release-notes.prompt.md
+++ b/.github/prompts/release-notes.prompt.md
@@ -19,7 +19,7 @@ This repository ships multiple packages. Only generate release notes for package
| `Microsoft.SqlServer.Server` | `release-notes/MSqlServerServer//` | PR titles/bodies/files referencing `Microsoft.SqlServer.Server` or `src/Microsoft.SqlServer.Server/` |
| `Microsoft.Data.SqlClient.Extensions.Abstractions` | `release-notes/Extensions/Abstractions//` | PR titles/bodies/files referencing `Extensions.Abstractions` |
| `Microsoft.Data.SqlClient.Extensions.Azure` | `release-notes/Extensions/Azure//` | PR titles/bodies/files referencing `Extensions.Azure` |
-| `Microsoft.Data.SqlClient.Extensions.Logging` | `release-notes/Extensions/Logging//` | PR titles/bodies/files referencing `Extensions.Logging` |
+| `Microsoft.Data.SqlClient.Internal.Logging` | `release-notes/Internal/Logging//` | PR titles/bodies/files referencing `Internal.Logging` |
## Version and Dependency Lookup
@@ -32,7 +32,7 @@ Each package has its own versioning and dependency sources. Use these to determi
| `Microsoft.SqlServer.Server` | [tools/props/Versions.props](tools/props/Versions.props) (`SqlServerPackageVersion`) | [SqlServer project file](src/Microsoft.SqlServer.Server/Microsoft.SqlServer.Server.csproj) |
| `Extensions.Abstractions` | [AbstractionsVersions.props](src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/AbstractionsVersions.props) | [Abstractions.csproj](src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj) |
| `Extensions.Azure` | [AzureVersions.props](src/Microsoft.Data.SqlClient.Extensions/Azure/src/AzureVersions.props) | [Azure.csproj](src/Microsoft.Data.SqlClient.Extensions/Azure/src/Azure.csproj) |
-| `Extensions.Logging` | [LoggingVersions.props](src/Microsoft.Data.SqlClient.Extensions/Logging/src/LoggingVersions.props) | [Logging.csproj](src/Microsoft.Data.SqlClient.Extensions/Logging/src/Logging.csproj) |
+| `Internal.Logging` | [LoggingVersions.props](src/Microsoft.Data.SqlClient.Internal/Logging/src/LoggingVersions.props) | [Logging.csproj](src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj) |
Concrete dependency versions (e.g., `Azure.Core 1.49.0`) are centrally managed in [Directory.Packages.props](Directory.Packages.props). Framework-conditional versions (e.g., `net9.0` vs everything else) are handled by `Condition` attributes in the same file.
diff --git a/Directory.Packages.props b/Directory.Packages.props
index f6a9f24815..e9f6461eb6 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -23,7 +23,7 @@
-->
-
+
diff --git a/build2.proj b/build2.proj
index ec8b32b141..a5fb6b89a2 100644
--- a/build2.proj
+++ b/build2.proj
@@ -47,7 +47,7 @@
PackageVersionLogging
Applies to: BuildMds, BuildMdsUnix, BuildMdsWindows
TestMdsFunctional, TestMdsManual
- Description: Specifies what version of the Microsoft.Data.SqlClient.Logging to use
+ Description: Specifies what version of the Microsoft.Data.SqlClient.Internal.Logging to use
when compiling MDS. If not specified, the version defined in
Directory.Packages.props is used. This argument only has effect if the
ReferenceType argument is set to "Package".
diff --git a/doc/apps/AzureAuthentication/README.md b/doc/apps/AzureAuthentication/README.md
index 20a3c628ba..84f33179a2 100644
--- a/doc/apps/AzureAuthentication/README.md
+++ b/doc/apps/AzureAuthentication/README.md
@@ -9,7 +9,7 @@ The following SqlClient packages are used, either directly or transitively:
- `Microsoft.Data.SqlClient`
- `Microsoft.SqlServer.Server`
-- `Microsoft.Data.SqlClient.Extensions.Logging`
+- `Microsoft.Data.SqlClient.Internal.Logging`
- `Microsoft.Data.SqlClient.Extensions.Abstractions`
- `Microsoft.Data.SqlClient.Extensions.Azure`
- `Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider`
diff --git a/eng/pipelines/jobs/pack-logging-package-ci-job.yml b/eng/pipelines/jobs/pack-logging-package-ci-job.yml
index 4a1a225f8a..dd748cb4b2 100644
--- a/eng/pipelines/jobs/pack-logging-package-ci-job.yml
+++ b/eng/pipelines/jobs/pack-logging-package-ci-job.yml
@@ -68,7 +68,7 @@ jobs:
# The Logging project file to use for all dotnet CLI commands.
- name: project
- value: src/Microsoft.Data.SqlClient.Extensions/Logging/src/Logging.csproj
+ value: src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
# The directory where the NuGet packages will be staged before being
# published as pipeline artifacts.
diff --git a/eng/pipelines/onebranch/jobs/build-akv-official-job.yml b/eng/pipelines/onebranch/jobs/build-akv-official-job.yml
index 8c75295f0d..af06ebc9d8 100644
--- a/eng/pipelines/onebranch/jobs/build-akv-official-job.yml
+++ b/eng/pipelines/onebranch/jobs/build-akv-official-job.yml
@@ -104,7 +104,7 @@ jobs:
# Download SqlClient (MDS), Abstractions, and Logging packages from previous
# stages into packages/ so that they're available via the local NuGet feed
# when restoring. AKV Provider depends on SqlClient, which transitively
- # requires Extensions.Abstractions and Extensions.Logging.
+ # requires Extensions.Abstractions and Internal.Logging.
- task: DownloadPipelineArtifact@2
displayName: Download SqlClient Package
inputs:
diff --git a/eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml b/eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml
index 07da49215d..565abd3683 100644
--- a/eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml
+++ b/eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml
@@ -42,7 +42,7 @@ jobs:
# Download the Abstractions and Logging packages from the previous stage into
# packages/ so that they're available via the local NuGet feed when restoring MDS.
- # MDS depends on both Extensions.Abstractions and Extensions.Logging.
+ # MDS depends on both Extensions.Abstractions and Internal.Logging.
- task: DownloadPipelineArtifact@2
displayName: Download Abstractions Package
inputs:
diff --git a/eng/pipelines/onebranch/sqlclient-non-official.yml b/eng/pipelines/onebranch/sqlclient-non-official.yml
index e08e02af10..e1d948b3fe 100644
--- a/eng/pipelines/onebranch/sqlclient-non-official.yml
+++ b/eng/pipelines/onebranch/sqlclient-non-official.yml
@@ -59,9 +59,9 @@ parameters:
type: boolean
default: false
- # Release the Microsoft.Data.SqlClient.Extensions.Logging package.
+ # Release the Microsoft.Data.SqlClient.Internal.Logging package.
- name: releaseLogging
- displayName: Release Microsoft.Data.SqlClient.Extensions.Logging
+ displayName: Release Microsoft.Data.SqlClient.Internal.Logging
type: boolean
default: false
diff --git a/eng/pipelines/onebranch/sqlclient-official.yml b/eng/pipelines/onebranch/sqlclient-official.yml
index 535e397aa1..b3c5fb2fb5 100644
--- a/eng/pipelines/onebranch/sqlclient-official.yml
+++ b/eng/pipelines/onebranch/sqlclient-official.yml
@@ -80,9 +80,9 @@ parameters:
type: boolean
default: false
- # Release the Microsoft.Data.SqlClient.Extensions.Logging package.
+ # Release the Microsoft.Data.SqlClient.Internal.Logging package.
- name: releaseLogging
- displayName: Release Microsoft.Data.SqlClient.Extensions.Logging
+ displayName: Release Microsoft.Data.SqlClient.Internal.Logging
type: boolean
default: false
diff --git a/eng/pipelines/onebranch/stages/build-stages.yml b/eng/pipelines/onebranch/stages/build-stages.yml
index 7e4bd6bf23..cab37d76b6 100644
--- a/eng/pipelines/onebranch/stages/build-stages.yml
+++ b/eng/pipelines/onebranch/stages/build-stages.yml
@@ -63,7 +63,7 @@ stages:
- template: /eng/pipelines/onebranch/jobs/build-signed-csproj-package-job.yml@self
parameters:
packageName: Logging
- packageFullName: Microsoft.Data.SqlClient.Extensions.Logging
+ packageFullName: Microsoft.Data.SqlClient.Internal.Logging
packageVersion: $(effectiveLoggingVersion)
versionProperties: >-
-p:LoggingPackageVersion=$(effectiveLoggingVersion)
@@ -98,7 +98,7 @@ stages:
# ====================================================================
# Stage 2: Abstractions package (depends on Logging from Stage 1)
# Abstractions must build after Logging since it has a package
- # dependency on Extensions.Logging.
+ # dependency on Internal.Logging.
# ====================================================================
- ${{ if eq(parameters.buildSqlClient, true) }}:
- stage: build_abstractions
diff --git a/eng/pipelines/onebranch/stages/release-stages.yml b/eng/pipelines/onebranch/stages/release-stages.yml
index 651408d03d..cf17ac7cec 100644
--- a/eng/pipelines/onebranch/stages/release-stages.yml
+++ b/eng/pipelines/onebranch/stages/release-stages.yml
@@ -142,9 +142,9 @@ stages:
- ${{ if eq(parameters.releaseLogging, true) }}:
- template: /eng/pipelines/onebranch/jobs/publish-nuget-package-job.yml@self
parameters:
- packageName: Microsoft.Data.SqlClient.Extensions.Logging
+ packageName: Microsoft.Data.SqlClient.Internal.Logging
artifactName: drop_build_independent_build_package_Logging
- packagePath: Microsoft.Data.SqlClient.Extensions.Logging.$(effectiveLoggingVersion).nupkg
+ packagePath: Microsoft.Data.SqlClient.Internal.Logging.$(effectiveLoggingVersion).nupkg
nugetServiceConnection: $(NuGetServiceConnection)
isProduction: ${{ parameters.isOfficial }}
isDryRun: ${{ parameters.isDryRun }}
diff --git a/eng/pipelines/stages/build-logging-package-ci-stage.yml b/eng/pipelines/stages/build-logging-package-ci-stage.yml
index 8ca9928bb7..6b5f22feeb 100644
--- a/eng/pipelines/stages/build-logging-package-ci-stage.yml
+++ b/eng/pipelines/stages/build-logging-package-ci-stage.yml
@@ -9,13 +9,13 @@
#
# The NuGet packages have the following properties:
#
-# Name: Microsoft.Data.SqlClient.Extensions.Logging
+# Name: Microsoft.Data.SqlClient.Internal.Logging
# Version: (from parameter)
#
# The following NuGet packages are published:
#
-# Microsoft.Data.SqlClient.Extensions.Logging..nupkg
-# Microsoft.Data.SqlClient.Extensions.Logging..snupkg (symbols)
+# Microsoft.Data.SqlClient.Internal.Logging..nupkg
+# Microsoft.Data.SqlClient.Internal.Logging..snupkg (symbols)
#
# The packages are published to pipeline artifacts with the name specified by
# the loggingArtifactsName parameter.
diff --git a/src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj b/src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj
index e87452a511..b93c296f70 100644
--- a/src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj
+++ b/src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj
@@ -106,10 +106,10 @@
depending on our build parameters.
-->
-
+
-
+
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient.Extensions/Azure/src/PackageReadme.md b/src/Microsoft.Data.SqlClient.Extensions/Azure/src/PackageReadme.md
index c3fdad2018..fc67695cf4 100644
--- a/src/Microsoft.Data.SqlClient.Extensions/Azure/src/PackageReadme.md
+++ b/src/Microsoft.Data.SqlClient.Extensions/Azure/src/PackageReadme.md
@@ -142,5 +142,5 @@ This package is licensed under the [MIT License](https://licenses.nuget.org/MIT)
- [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) - The main SqlClient driver
- [Microsoft.Data.SqlClient.Extensions.Abstractions](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Extensions.Abstractions) - Core abstractions
-- [Microsoft.Data.SqlClient.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Extensions.Logging) - Logging extensions
+- [Microsoft.Data.SqlClient.Internal.Logging](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Internal.Logging) - Logging extensions
- [Azure.Identity](https://www.nuget.org/packages/Azure.Identity) - Azure AD authentication library
diff --git a/src/Microsoft.Data.SqlClient.Extensions/Logging/src/Logging.csproj b/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
similarity index 93%
rename from src/Microsoft.Data.SqlClient.Extensions/Logging/src/Logging.csproj
rename to src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
index 1b56016dde..36ee728240 100644
--- a/src/Microsoft.Data.SqlClient.Extensions/Logging/src/Logging.csproj
+++ b/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
@@ -27,7 +27,7 @@
- Microsoft.Data.SqlClient.Extensions.Logging
+ Microsoft.Data.SqlClient.Internal.Logging
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
index 08639abe2c..9f716e81fb 100644
--- a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
+++ b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
@@ -8,6 +8,7 @@
using Azure.Core;
using Azure.Security.KeyVault.Keys.Cryptography;
using static Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.Validator;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
{
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
index 3ad83ed492..6c54000f9c 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -1092,10 +1092,10 @@
depending on our build parameters.
-->
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj
index cdd54bd244..05a4284565 100644
--- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj
@@ -1076,10 +1076,10 @@
depending on our build parameters.
-->
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
index 4fbe15bd1b..349746b78b 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
@@ -154,10 +154,10 @@
depending on our build parameters.
-->
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
index d110eebb27..e2a84bad04 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
@@ -23,6 +23,7 @@
using Microsoft.Data.SqlClient.Connection;
using Microsoft.SqlServer.Server;
using IsolationLevel = System.Data.IsolationLevel;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Reflection;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.Debug.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.Debug.cs
index 368c351152..2c1a107ba4 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.Debug.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.Debug.cs
@@ -8,6 +8,7 @@
using System.Globalization;
using System.Text.RegularExpressions;
using Microsoft.Data.SqlClient;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.Common.ConnectionString
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionString.netfx.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionString.netfx.cs
index 56af12e08d..dfb383d6b1 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionString.netfx.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionString.netfx.cs
@@ -11,6 +11,7 @@
using System.Text;
using Microsoft.Data.Common.ConnectionString;
using Microsoft.Data.SqlClient;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.Common
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/DataException.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/DataException.cs
index b509971c07..6c7ea54a52 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/DataException.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/DataException.cs
@@ -5,6 +5,7 @@
using System;
using System.Diagnostics;
using Microsoft.Data.SqlClient;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionInternal.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionInternal.cs
index 197d7a0cfc..b4426bc4d6 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionInternal.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionInternal.cs
@@ -13,6 +13,7 @@
using Microsoft.Data.Common.ConnectionString;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.ConnectionPool;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.ConstrainedExecution;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorManagedHelper.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorManagedHelper.netcore.cs
index 8355d72d6f..2bc42aa38c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorManagedHelper.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorManagedHelper.netcore.cs
@@ -7,6 +7,7 @@
using System.Collections.Generic;
using System.Data;
using Microsoft.Data.Sql;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.Server
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorNativeHelper.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorNativeHelper.windows.cs
index 3dfe29704b..a6325d9990 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorNativeHelper.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Sql/SqlDataSourceEnumeratorNativeHelper.windows.cs
@@ -13,6 +13,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient;
using static Microsoft.Data.Sql.SqlDataSourceEnumeratorUtil;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.Sql
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs
index bdca44b743..b050922be2 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs
@@ -19,6 +19,7 @@
using Microsoft.Data.SqlClient.Connection;
using Microsoft.Data.SqlClient.ConnectionPool;
using IsolationLevel = System.Data.IsolationLevel;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.Connection
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs
index 8e863cd711..63815e8200 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs
@@ -15,6 +15,7 @@
using Microsoft.Data.Common.ConnectionString;
using Microsoft.Data.ProviderBase;
using static Microsoft.Data.SqlClient.ConnectionPool.DbConnectionPoolState;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs
index 3870b11ed6..786f91684b 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs
@@ -10,6 +10,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.Common.ConnectionString;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ConnectionPool
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/SqlConnectionPoolGroupProviderInfo.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/SqlConnectionPoolGroupProviderInfo.cs
index b83a2be4bb..b946d839a8 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/SqlConnectionPoolGroupProviderInfo.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/SqlConnectionPoolGroupProviderInfo.cs
@@ -4,6 +4,7 @@
using System.Security;
using Microsoft.Data.Common.ConnectionString;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ConnectionPool
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/TransactedConnectionPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/TransactedConnectionPool.cs
index 3132d310d1..7245164f2c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/TransactedConnectionPool.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/TransactedConnectionPool.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
using System.Transactions;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.cs
index 0db4ed6f63..194054e58e 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.cs
@@ -16,6 +16,7 @@
using Microsoft.Data.Common.ConnectionString;
using Microsoft.Data.ProviderBase;
using static Microsoft.Data.SqlClient.ConnectionPool.DbConnectionPoolState;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ConnectionPool
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Diagnostics/SqlClientMetrics.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Diagnostics/SqlClientMetrics.cs
index c73e80243c..ed27a9591f 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Diagnostics/SqlClientMetrics.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Diagnostics/SqlClientMetrics.cs
@@ -4,6 +4,7 @@
using System;
using System.Diagnostics.Tracing;
+using Microsoft.Data.SqlClient.Internal;
#if NET
using System.Threading;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs
index 74fd226728..7694092907 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs
@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalDb/LocalDbApi.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalDb/LocalDbApi.windows.cs
index 9a922c3286..5fdb62cd8e 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalDb/LocalDbApi.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalDb/LocalDbApi.windows.cs
@@ -16,6 +16,7 @@
#if NETFRAMEWORK
using System.Collections.Generic;
using System.Configuration;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient.LocalDb
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/LocalDB.netcore.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/LocalDB.netcore.windows.cs
index 70449314c6..bd45d307a1 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/LocalDB.netcore.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/LocalDB.netcore.windows.cs
@@ -10,6 +10,7 @@
using Interop.Windows.Handles;
using Interop.Windows.Kernel32;
using Microsoft.Win32;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniCommon.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniCommon.netcore.cs
index 640141fabd..c2d3e0073c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniCommon.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniCommon.netcore.cs
@@ -12,6 +12,7 @@
using System.Text;
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsConnection.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsConnection.netcore.cs
index f10f10e061..240e62666e 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsConnection.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsConnection.netcore.cs
@@ -9,6 +9,7 @@
using System.Diagnostics;
using System.Security.Authentication;
using System.Threading;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsHandle.netcore.cs
index 393afe1c94..46063f9484 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsHandle.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniMarsHandle.netcore.cs
@@ -9,6 +9,7 @@
using System.Diagnostics;
using System.Security.Authentication;
using System.Threading;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNetworkStream.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNetworkStream.netcore.cs
index f939ba4b7e..febe017e83 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNetworkStream.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNetworkStream.netcore.cs
@@ -8,6 +8,7 @@
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNpHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNpHandle.netcore.cs
index 783fd5bd0b..e7ef8ad890 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNpHandle.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniNpHandle.netcore.cs
@@ -13,6 +13,7 @@
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniPacket.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniPacket.netcore.cs
index fbcb74eb0c..aaf72cd54f 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniPacket.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniPacket.netcore.cs
@@ -11,6 +11,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniProxy.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniProxy.netcore.cs
index 643e567ed6..da6885062d 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniProxy.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniProxy.netcore.cs
@@ -11,6 +11,7 @@
using System.Net.Sockets;
using System.Text;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniSslStream.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniSslStream.netcore.cs
index a7fc289d7f..6cb44c4b0e 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniSslStream.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniSslStream.netcore.cs
@@ -9,6 +9,7 @@
using System.Net.Security;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniTcpHandle.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniTcpHandle.netcore.cs
index 3bc29c1473..9ce9684235 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniTcpHandle.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SniTcpHandle.netcore.cs
@@ -16,6 +16,7 @@
using System.Threading;
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SslOverTdsStream.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SslOverTdsStream.netcore.cs
index 70ee8adea9..ea25c2b9af 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SslOverTdsStream.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SslOverTdsStream.netcore.cs
@@ -10,6 +10,7 @@
using System.IO.Pipes;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SsrpClient.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SsrpClient.netcore.cs
index f4665729ed..1582a80bd4 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SsrpClient.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ManagedSni/SsrpClient.netcore.cs
@@ -13,6 +13,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient.ManagedSni
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/AppConfigManager.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/AppConfigManager.cs
index 29cd2273b8..77797e7235 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/AppConfigManager.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/AppConfigManager.cs
@@ -4,6 +4,7 @@
using System;
using System.Configuration;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogic.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogic.cs
index 389cbd161f..92b342e930 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogic.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogic.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
using System.Reflection;
using System.Transactions;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogicProvider.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogicProvider.cs
index d9d44235b5..366c18d697 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogicProvider.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/Common/SqlRetryLogicProvider.cs
@@ -8,6 +8,7 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
index c04561da46..0bcebdad9a 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
index 88511a8a00..fe2309dab2 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
@@ -11,6 +11,7 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.Loader;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs
index aa20f7b845..3800ddee9a 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs
@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSspiContextProvider.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSspiContextProvider.cs
index 5971d48409..2457de25b0 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSspiContextProvider.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSspiContextProvider.cs
@@ -8,6 +8,7 @@
using System.Buffers;
using System.Diagnostics;
using System.Net.Security;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs
index a8531ea004..757e57e1c3 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs
@@ -6,6 +6,7 @@
using System.Buffers;
using System.Diagnostics;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAppContextSwitchManager.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAppContextSwitchManager.netcore.cs
index e9a73c5704..9af748c3d5 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAppContextSwitchManager.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAppContextSwitchManager.netcore.cs
@@ -6,6 +6,7 @@
using System;
using System.Configuration;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
index 0e5e7c5201..54468782bd 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
@@ -8,6 +8,7 @@
using System.Configuration;
using System.IO;
using System.Reflection;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
index e898b09f50..710d81045f 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
@@ -16,6 +16,7 @@
using System.Xml;
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEventSource.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEventSource.cs
index fed5b80c33..44897f565c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEventSource.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEventSource.cs
@@ -3,13 +3,14 @@
// See the LICENSE file in the project root for more information.
using Microsoft.Data.SqlClient.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
///
/// Internal bridge that provides access to SqlClientMetrics from the main driver.
/// The SqlClientEventSource class itself is now defined in the
- /// Microsoft.Data.SqlClient.Extensions.Logging package.
+ /// Microsoft.Data.SqlClient.Internal.Logging package.
///
internal static class SqlClientDiagnostics
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientLogger.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientLogger.cs
index 4af64594ef..3bc917f4f4 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientLogger.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientLogger.cs
@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs
index 92263ca577..36d727575c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs
@@ -11,6 +11,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Security.Permissions;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Reader.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Reader.cs
index fcd95d35d9..d9f6c33233 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Reader.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Reader.cs
@@ -12,6 +12,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Security.Permissions;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Scalar.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Scalar.cs
index d0e2b8cb2b..2a47e1466f 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Scalar.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Scalar.cs
@@ -7,6 +7,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Xml.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Xml.cs
index 38afb87560..c025e1d3b7 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Xml.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Xml.cs
@@ -12,6 +12,7 @@
using Microsoft.Data.ProviderBase;
using Microsoft.Data.SqlClient.Connection;
using Microsoft.Data.SqlClient.Server;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Security.Permissions;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.cs
index 18c531ace7..71845ddeb9 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.cs
@@ -19,6 +19,7 @@
using Microsoft.Data.Sql;
using Microsoft.Data.SqlClient.Connection;
using Microsoft.Data.SqlClient.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Security.Permissions;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommandSet.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommandSet.cs
index 834055e8f4..8773ab1f96 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommandSet.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommandSet.cs
@@ -10,6 +10,7 @@
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs
index 19571c55dc..e22988b35d 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs
@@ -24,6 +24,7 @@
using Microsoft.Data.SqlClient.ConnectionPool;
using Microsoft.Data.SqlClient.Diagnostics;
using Microsoft.SqlServer.Server;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.CompilerServices;
using System.Security.Permissions;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
index 0fd0746665..33e43bf20c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
@@ -19,6 +19,7 @@
#if NET
using System.Runtime.Loader;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
index 01abf3ded7..28c3c965ec 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
@@ -9,6 +9,7 @@
using System.Diagnostics;
using System.Threading;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
// NOTE: The current Microsoft.VSDesigner editor attributes are implemented for System.Data.SqlClient, and are not publicly available.
// New attributes that are designed to work with Microsoft.Data.SqlClient and are publicly documented should be included in future.
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs
index 2567918726..0d6203c08d 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs
@@ -28,6 +28,7 @@
using Microsoft.Data.SqlClient.DataClassification;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Data.SqlTypes;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs
index c463b2aeb4..09c49cde4b 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs
@@ -9,6 +9,7 @@
using System.Transactions;
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependency.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependency.cs
index d9cd9c798e..83d9753799 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependency.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependency.cs
@@ -13,6 +13,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.Sql;
using Microsoft.Data.SqlClient.ConnectionPool;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.IO;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs
index 208b3d6693..306b36b747 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs
@@ -13,6 +13,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.ConnectionPool;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.CompilerServices;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyUtils.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyUtils.cs
index 9eebc0e141..59b36d23cc 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyUtils.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyUtils.cs
@@ -7,6 +7,7 @@
using System.Diagnostics;
using System.Threading;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlError.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlError.cs
index a0d00956e9..188a5651d9 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlError.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlError.cs
@@ -4,6 +4,7 @@
using System;
using Microsoft.Data.Common.ConnectionString;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs
index 29dc81de15..bc5f5cbccb 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs
@@ -8,6 +8,7 @@
using System.Threading;
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient.Connection;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
index 35bd82cf21..5e654659a1 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
@@ -11,6 +11,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.SqlClient.Connection;
using Microsoft.Data.SqlClient.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.CompilerServices;
#endif
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
index 76e5d775f2..94281b4998 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
@@ -27,6 +27,7 @@
using Microsoft.Data.SqlClient.Server;
using Microsoft.Data.SqlClient.Utilities;
using Microsoft.SqlServer.Server;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.CompilerServices;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs
index 4baf3e1b69..d9727f9975 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs
@@ -13,6 +13,7 @@
#if NETFRAMEWORK
using System.Runtime.CompilerServices;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSessionPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSessionPool.cs
index 64fd2590a4..e155f71cb3 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSessionPool.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSessionPool.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.Data.Common;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs
index c76b795416..3565afdb4d 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs
@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs
index cf8d6cd524..b7fa5c865b 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs
@@ -16,6 +16,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
using Microsoft.Data.SqlClient.ManagedSni;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Runtime.ConstrainedExecution;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectFactory.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectFactory.windows.cs
index eed5187596..a54873cb21 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectFactory.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectFactory.windows.cs
@@ -6,6 +6,7 @@
#if NET
using Microsoft.Data.SqlClient.ManagedSni;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.netcore.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.netcore.cs
index cf9924cc24..c3667fda1c 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.netcore.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.netcore.cs
@@ -13,6 +13,7 @@
using System.Threading.Tasks;
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
#nullable enable
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectNative.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectNative.windows.cs
index d04e3798a7..7812860b5e 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectNative.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObjectNative.windows.cs
@@ -14,6 +14,7 @@
using Interop.Windows.Sni;
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
+using Microsoft.Data.SqlClient.Internal;
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlFileStream.windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlFileStream.windows.cs
index 3ec1412714..b54176893f 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlFileStream.windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlFileStream.windows.cs
@@ -23,6 +23,7 @@
using System.Security;
using System.Security.Permissions;
using System.Text;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlTypes
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
index 1c825bbaef..82f5be9528 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
@@ -13,6 +13,7 @@
#if NETFRAMEWORK
using System.Reflection;
using System.Runtime.InteropServices;
+using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlTypes
diff --git a/tools/props/Versions.props b/tools/props/Versions.props
index 46264bc363..214dcde21a 100644
--- a/tools/props/Versions.props
+++ b/tools/props/Versions.props
@@ -27,7 +27,7 @@
-
+
diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec
index 9507357a00..92597275a1 100644
--- a/tools/specs/Microsoft.Data.SqlClient.nuspec
+++ b/tools/specs/Microsoft.Data.SqlClient.nuspec
@@ -38,7 +38,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -67,7 +67,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
From 4d4abe1ad117850a388321ea223576c1bc8602d9 Mon Sep 17 00:00:00 2001
From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
Date: Thu, 12 Mar 2026 14:48:12 -0300
Subject: [PATCH 2/6] Added notes indicating the Logging package is for
internal use only.
---
release-notes/Extensions/Logging/1.0/1.0.0-preview1.md | 5 ++++-
release-notes/Extensions/Logging/1.0/README.md | 3 +++
.../Logging/src/Logging.csproj | 5 ++++-
.../Logging/src/PackageReadme.md | 8 ++++++++
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/release-notes/Extensions/Logging/1.0/1.0.0-preview1.md b/release-notes/Extensions/Logging/1.0/1.0.0-preview1.md
index e97fd8a78b..5f5e44be15 100644
--- a/release-notes/Extensions/Logging/1.0/1.0.0-preview1.md
+++ b/release-notes/Extensions/Logging/1.0/1.0.0-preview1.md
@@ -1,10 +1,13 @@
# Release Notes
+> **Note:** This package is for internal use by other Microsoft.Data.SqlClient packages only
+> and should not be referenced directly by application code.
+
## Preview Release 1.0.0-preview1.26064.3 - 2026-03-05
### Added
-- Initial release of `Microsoft.Data.SqlClient.Extensions.Logging`, providing shared logging infrastructure for use by `Microsoft.Data.SqlClient` and its extension packages.
+- Initial release of `Microsoft.Data.SqlClient.Extensions.Logging`, providing shared logging infrastructure for internal use by `Microsoft.Data.SqlClient` and its extension packages.
([#3626](https://github.com/dotnet/SqlClient/pull/3626),
[#3628](https://github.com/dotnet/SqlClient/pull/3628),
[#3967](https://github.com/dotnet/SqlClient/pull/3967))
diff --git a/release-notes/Extensions/Logging/1.0/README.md b/release-notes/Extensions/Logging/1.0/README.md
index 0d4860dc5a..b31406665b 100644
--- a/release-notes/Extensions/Logging/1.0/README.md
+++ b/release-notes/Extensions/Logging/1.0/README.md
@@ -1,5 +1,8 @@
# Microsoft.Data.SqlClient.Extensions.Logging 1.0 Releases
+> **Note:** This package is for internal use by other Microsoft.Data.SqlClient packages only
+> and should not be referenced directly by application code.
+
The following `Microsoft.Data.SqlClient.Extensions.Logging`
1.0 releases have been shipped:
diff --git a/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj b/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
index 36ee728240..1146e92c8f 100644
--- a/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
+++ b/src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj
@@ -92,6 +92,9 @@
Microsoft.Data.SqlClient Internal Logging - ETW EventSource for SqlClient tracing
and diagnostics.
+
+ This package is for internal use by other Microsoft.Data.SqlClient
+ packages only and should not be referenced directly by application code.
© Microsoft Corporation. All rights reserved.
sqlclient microsoft.data.sqlclient internal logging
@@ -122,4 +125,4 @@
-
\ No newline at end of file
+
diff --git a/src/Microsoft.Data.SqlClient.Internal/Logging/src/PackageReadme.md b/src/Microsoft.Data.SqlClient.Internal/Logging/src/PackageReadme.md
index 32eed5ec53..ad91ca76e4 100644
--- a/src/Microsoft.Data.SqlClient.Internal/Logging/src/PackageReadme.md
+++ b/src/Microsoft.Data.SqlClient.Internal/Logging/src/PackageReadme.md
@@ -3,6 +3,14 @@
[](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Internal.Logging)
[](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Internal.Logging)
+> **⚠️ Internal Package — Do Not Reference Directly**
+>
+> This package is intended for **internal use by other Microsoft.Data.SqlClient packages only**.
+> It is not designed for direct consumption by application code and may undergo breaking changes
+> without notice. Application developers should reference
+> [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) instead,
+> which includes this package as a transitive dependency.
+
## Description
This package provides **ETW EventSource tracing and diagnostics** for [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient). It enables comprehensive logging and telemetry capabilities for SQL Server database operations.
From d425a5c2267995173cd04aa6a50bf0a8b8823aa6 Mon Sep 17 00:00:00 2001
From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
Date: Thu, 12 Mar 2026 15:04:09 -0300
Subject: [PATCH 3/6] Fixed some lingering usings.
---
.../SqlConfigurableRetryLogicLoader.cs | 2 +-
.../Data/SqlClient/SqlConnectionFactory.cs | 2 +-
.../Data/SqlTypes/SqlTypeWorkarounds.cs | 44 +++++++++----------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
index fe2309dab2..dfc7861dc3 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs
@@ -6,12 +6,12 @@
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
+using Microsoft.Data.SqlClient.Internal;
#if NET
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.Loader;
-using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
index 33e43bf20c..89be9767d8 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionFactory.cs
@@ -16,10 +16,10 @@
using Microsoft.Data.ProviderBase;
using Microsoft.Data.SqlClient.Connection;
using Microsoft.Data.SqlClient.ConnectionPool;
+using Microsoft.Data.SqlClient.Internal;
#if NET
using System.Runtime.Loader;
-using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlClient
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
index 82f5be9528..182f3562eb 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlTypeWorkarounds.cs
@@ -9,11 +9,11 @@
using System.Runtime.CompilerServices;
using System.Xml;
using Microsoft.Data.SqlClient;
+using Microsoft.Data.SqlClient.Internal;
#if NETFRAMEWORK
using System.Reflection;
using System.Runtime.InteropServices;
-using Microsoft.Data.SqlClient.Internal;
#endif
namespace Microsoft.Data.SqlTypes
@@ -27,7 +27,7 @@ namespace Microsoft.Data.SqlTypes
internal static class SqlTypeWorkarounds
{
#region Work around inability to access SqlXml.CreateSqlXmlReader
-
+
private static readonly XmlReaderSettings s_defaultXmlReaderSettings = new() { ConformanceLevel = ConformanceLevel.Fragment };
private static readonly XmlReaderSettings s_defaultXmlReaderSettingsCloseInput = new() { ConformanceLevel = ConformanceLevel.Fragment, CloseInput = true };
private static readonly XmlReaderSettings s_defaultXmlReaderSettingsAsyncCloseInput = new() { Async = true, ConformanceLevel = ConformanceLevel.Fragment, CloseInput = true };
@@ -45,14 +45,14 @@ internal static XmlReader SqlXmlCreateSqlXmlReader(Stream stream, bool closeInpu
Debug.Assert(closeInput || !async, "Currently we do not have pre-created settings for !closeInput+async");
XmlReaderSettings settingsToUse = closeInput
- ? async
+ ? async
? s_defaultXmlReaderSettingsAsyncCloseInput
: s_defaultXmlReaderSettingsCloseInput
: s_defaultXmlReaderSettings;
return XmlReader.Create(stream, settingsToUse);
}
-
+
#endregion
#region Work around inability to access SqlDateTime.ToDateTime
@@ -70,7 +70,7 @@ internal static DateTime SqlDateTimeToDateTime(int daypart, int timepart)
const uint MaxTime = SQLTicksPerDay - 1; // = 25919999, 11:59:59:997PM
const long BaseDateTicks = 599266080000000000L;//new DateTime(1900, 1, 1).Ticks;
- // casting to uint wraps negative values to large positive ones above the valid
+ // casting to uint wraps negative values to large positive ones above the valid
// ranges so the lower bound doesn't need to be checked
if ((uint)(daypart + MinDayOffset) > (MaxDay + MinDayOffset) || (uint)timepart > MaxTime)
{
@@ -92,9 +92,9 @@ internal static DateTime SqlDateTimeToDateTime(int daypart, int timepart)
private static Exception ThrowOverflowException() => throw SQL.DateTimeOverflow();
#endregion
-
+
#if NETFRAMEWORK
-
+
#region Work around inability to access `new SqlBinary(byte[], bool)`
// Documentation of internal constructor:
@@ -104,9 +104,9 @@ internal static DateTime SqlDateTimeToDateTime(int daypart, int timepart)
internal static SqlBinary ByteArrayToSqlBinary(byte[] value) =>
ByteArrayToSqlBinaryFactory(value);
-
+
#endregion
-
+
#region Work around SqlDecimal.WriteTdsValue not existing in netfx
///
@@ -125,16 +125,16 @@ internal static void SqlDecimalWriteTdsValue(SqlDecimal value, Span outSpa
// SqlDecimal, we cannot use them because they are not documented. The Data property
// is less ideal, but is documented.
Debug.Assert(outSpan.Length == 4, "Output span must be 4 elements long.");
-
+
int[] data = value.Data;
outSpan[0] = (uint)data[0];
outSpan[1] = (uint)data[1];
outSpan[2] = (uint)data[2];
outSpan[3] = (uint)data[3];
}
-
+
#endregion
-
+
#region Work around inability to access `new SqlGuid(byte[], bool)`
// Documentation for internal constructor:
@@ -144,9 +144,9 @@ internal static void SqlDecimalWriteTdsValue(SqlDecimal value, Span outSpa
internal static SqlGuid ByteArrayToSqlGuid(byte[] value) =>
ByteArrayToSqlGuidFactory(value);
-
+
#endregion
-
+
#region Work around inability to access `new SqlMoney(long, int)` and `SqlMoney.ToInternalRepresentation()`
// Documentation for internal ctor:
@@ -157,7 +157,7 @@ internal static SqlGuid ByteArrayToSqlGuid(byte[] value) =>
private delegate long SqlMoneyToLongDelegate(ref SqlMoney @this);
private static readonly SqlMoneyToLongDelegate SqlMoneyToLongFactory =
CreateSqlMoneyToLongFactory();
-
+
///
/// Constructs a SqlMoney from a long value without scaling.
///
@@ -181,7 +181,7 @@ private static SqlMoneyToLongDelegate CreateSqlMoneyToLongFactory()
// we are calling below *is* documented, despite it being internal.
// Documentation for internal method:
// https://learn.microsoft.com/en-us/dotnet/framework/additional-apis/system.data.sqltypes.sqlmoney.tosqlinternalrepresentation
-
+
MethodInfo method = typeof(SqlMoney).GetMethod(
"ToSqlInternalRepresentation",
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.ExactBinding,
@@ -196,7 +196,7 @@ private static SqlMoneyToLongDelegate CreateSqlMoneyToLongFactory()
// Note: We must use something other than default since this cannot be used on
// Null SqlMoney structs.
_ = method.Invoke(SqlMoney.Zero, Array.Empty