Skip to content

Commit ca8fbea

Browse files
committed
Merge remote-tracking branch 'origin/main' into auth-params
2 parents a813d22 + 17621da commit ca8fbea

File tree

63 files changed

+1717
-2419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1717
-2419
lines changed

eng/pipelines/dotnet-sqlclient-signing-pipeline.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,22 @@ extends:
8484
featureFlags:
8585
WindowsHostVersion: 1ESWindows2022
8686
globalSdl: # https://aka.ms/obpipelines/sdl
87+
tsa:
88+
# The OneBranch template will set 'break' to false for the other SDL
89+
# tools when TSA is enabled. This allows TSA to gather the results
90+
# and publish them for downstream analysis.
91+
enabled: ${{parameters.enableAllSdlTools }}
8792
apiscan:
88-
enabled: ${{ not(parameters['isPreview']) }}
93+
enabled: ${{parameters.enableAllSdlTools }}
94+
# For non-official builds, the OneBranch template seems to set APIScan's
95+
# 'break' to true even when TSA is enabled. We don't want APIScan to
96+
# break non-official builds, so we explicitly set 'break' to false here.
97+
${{ if ne(parameters.oneBranchType, 'Official') }}:
98+
break: false
8999
softwareFolder: $(softwareFolder)
90100
symbolsFolder: $(symbolsFolder)
91101
softwarename: Microsoft.Data.SqlClient
92102
versionNumber: $(AssemblyFileVersion)
93-
tsa:
94-
enabled: ${{ not(parameters['isPreview']) }} # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
95103
codeql:
96104
compiled:
97105
enabled: ${{ not(parameters['isPreview']) }}

eng/pipelines/libraries/common-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variables:
3838
- name: Preview
3939
value: '-preview'
4040
- name: Revision
41-
value: '1'
41+
value: '2'
4242

4343
- name: NugetPackageVersion
4444
value: $(Major).$(Minor).$(Patch)

src/Directory.Build.props

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<LangVersion>9.0</LangVersion>
54
<TargetsWindows Condition="'$(OS)' == 'Windows_NT' AND '$(OSGroup)' == ''">true</TargetsWindows>
65
<TargetsWindows Condition="'$(OS)' != 'Windows_NT' AND '$(OSGroup)' == ''">false</TargetsWindows>
76
<TargetsWindows Condition="'$(OSGroup)' == 'Windows_NT'">true</TargetsWindows>
@@ -72,15 +71,17 @@
7271
</PropertyGroup>
7372

7473
<!-- NuGet Audit Settings -->
75-
<PropertyGroup>
74+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
7675
<!--
7776
ADO does not support audit/vulnerability feeds, so the audit feed is specified (in
7877
nuget.config) as nuget.org. OneBranch default network isolation does not allow connections
7978
to nuget.org. To avoid this issue, we will disable auditing for official builds, but leave it
8079
enabled for local builds.
8180
@TODO: If/when auditing is enabled for central feeds services, this can be removed.
8281
-->
83-
<NuGetAudit Condition="'$(TF_BUILD)' == 'true'">false</NuGetAudit>
82+
<NuGetAudit>false</NuGetAudit>
83+
</PropertyGroup>
84+
<PropertyGroup>
8485
<NuGetAuditMode>all</NuGetAuditMode>
8586
</PropertyGroup>
8687

@@ -111,4 +112,25 @@
111112
<PropertyGroup>
112113
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
113114
</PropertyGroup>
115+
116+
<!--
117+
For non-.NET, we explicitly set the C# language version to 13. This matches
118+
the language version used by the .NET 9 SDK, and provides helpful modern
119+
language features. While this isn't strictly supported by .NET in general,
120+
it works well in practice. There are very few C# language features that
121+
depend on SDK APIs, and we avoid them.
122+
123+
For .NET, we omit this property entirely, which results in the SDK choosing
124+
the C# language version that matches the .NET version.
125+
126+
Details here:
127+
128+
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-versioning
129+
130+
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version
131+
-->
132+
<PropertyGroup
133+
Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))' != '.NETCoreApp'">
134+
<LangVersion>13.0</LangVersion>
135+
</PropertyGroup>
114136
</Project>

src/Microsoft.Data.SqlClient/netcore/src/Common/System/NotImplemented.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<Link>Microsoft\Data\ProviderBase\DbMetaDataFactory.cs</Link>
142142
</Compile>
143143
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbReferenceCollection.cs">
144-
<Link>Common\Microsoft\Data\ProviderBase\DbReferenceCollection.cs</Link>
144+
<Link>Microsoft\Data\ProviderBase\DbReferenceCollection.cs</Link>
145145
</Compile>
146146
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\FieldNameLookup.cs">
147147
<Link>Microsoft\Data\ProviderBase\FieldNameLookup.cs</Link>
@@ -152,8 +152,8 @@
152152
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumerator.cs">
153153
<Link>Microsoft\Data\Sql\SqlDataSourceEnumerator.cs</Link>
154154
</Compile>
155-
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumeratorManagedHelper.cs">
156-
<Link>Microsoft\Data\Sql\SqlDataSourceEnumeratorManagedHelper.cs</Link>
155+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumeratorManagedHelper.netcore.cs">
156+
<Link>Microsoft\Data\Sql\SqlDataSourceEnumeratorManagedHelper.netcore.cs</Link>
157157
</Compile>
158158
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumeratorUtil.cs">
159159
<Link>Microsoft\Data\Sql\SqlDataSourceEnumeratorUtil.cs</Link>
@@ -380,8 +380,8 @@
380380
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiTypedGetterSetter.cs">
381381
<Link>Microsoft\Data\SqlClient\Server\SmiTypedGetterSetter.cs</Link>
382382
</Compile>
383-
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiXetterAccessMap.Common.cs">
384-
<Link>Microsoft\Data\SqlClient\Server\SmiXetterAccessMap.Common.cs</Link>
383+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiXetterAccessMap.cs">
384+
<Link>Microsoft\Data\SqlClient\Server\SmiXetterAccessMap.cs</Link>
385385
</Compile>
386386
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Server\SmiXetterTypeCode.cs">
387387
<Link>Microsoft\Data\SqlClient\Server\SmiXetterTypeCode.cs</Link>
@@ -728,8 +728,6 @@
728728
<Compile Include="$(CommonSourceRoot)System\Diagnostics\CodeAnalysis.cs">
729729
<Link>System\Diagnostics\CodeAnalysis.cs</Link>
730730
</Compile>
731-
732-
<Compile Include="Common\System\NotImplemented.cs" />
733731
<Compile Include="Microsoft\Data\Common\DbConnectionOptions.cs" />
734732
<Compile Include="Microsoft\Data\SqlClient\SNI\ConcurrentQueueSemaphore.cs" />
735733
<Compile Include="Microsoft\Data\SqlClient\SNI\SNIError.cs" />
@@ -785,34 +783,34 @@
785783
<Link>Interop\Windows\Kernel32\Kernel32.cs</Link>
786784
</Compile>
787785
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\CreateDisposition.cs">
788-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\CreateDisposition.cs</Link>
786+
<Link>Interop\Windows\NtDll\CreateDisposition.cs</Link>
789787
</Compile>
790788
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\CreateOptions.cs">
791-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\CreateOptions.cs</Link>
789+
<Link>Interop\Windows\NtDll\CreateOptions.cs</Link>
792790
</Compile>
793791
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\DesiredAccess.cs">
794-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\DesiredAccess.cs</Link>
792+
<Link>Interop\Windows\NtDll\DesiredAccess.cs</Link>
795793
</Compile>
796794
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\FileFullEaInformation.cs">
797-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\FileFullEaInformation.cs</Link>
795+
<Link>Interop\Windows\NtDll\FileFullEaInformation.cs</Link>
798796
</Compile>
799797
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\ImpersonationLevel.cs">
800-
<Link>Interop\Windows\NtDll\ImpersonaltionLevel.cs</Link>
798+
<Link>Interop\Windows\NtDll\ImpersonationLevel.cs</Link>
801799
</Compile>
802800
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\IoStatusBlock.cs">
803801
<Link>Interop\Windows\NtDll\IoStatusBlock.cs</Link>
804802
</Compile>
805803
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\NtDll.cs">
806-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\NtDll.cs</Link>
804+
<Link>Interop\Windows\NtDll\NtDll.cs</Link>
807805
</Compile>
808806
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\ObjectAttributeFlags.cs">
809-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\ObjectAttributes.cs</Link>
807+
<Link>Interop\Windows\NtDll\ObjectAttributeFlags.cs</Link>
810808
</Compile>
811809
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\ObjectAttributes.cs">
812-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\ObjectAttributes.cs</Link>
810+
<Link>Interop\Windows\NtDll\ObjectAttributes.cs</Link>
813811
</Compile>
814812
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\SecurityQualityOfService.cs">
815-
<Link>Interop\Windows\NtDll\Interop\Windows\NtDll\SecurityQualityOfService.cs</Link>
813+
<Link>Interop\Windows\NtDll\SecurityQualityOfService.cs</Link>
816814
</Compile>
817815
<Compile Include="$(CommonSourceRoot)\Interop\Windows\Sni\AuthProviderInfo.cs">
818816
<Link>Interop\Windows\Sni\AuthProviderInfo.cs</Link>
@@ -868,15 +866,15 @@
868866
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\AdapterUtil.Windows.cs">
869867
<Link>Microsoft\Data\Common\AdapterUtil.Windows.cs</Link>
870868
</Compile>
871-
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Windows.cs">
872-
<Link>Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Windows.cs</Link>
873-
</Compile>
874869
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumeratorNativeHelper.cs">
875870
<Link>Microsoft\Data\Sql\SqlDataSourceEnumeratorNativeHelper.cs</Link>
876871
</Compile>
877872
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumerator.Windows.cs">
878873
<Link>Microsoft\Data\Sql\SqlDataSourceEnumerator.Windows.cs</Link>
879874
</Compile>
875+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Windows.cs">
876+
<Link>Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Windows.cs</Link>
877+
</Compile>
880878
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs">
881879
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs</Link>
882880
</Compile>
@@ -901,21 +899,26 @@
901899
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserSafeHandles.Windows.cs">
902900
<Link>Microsoft\Data\SqlClient\TdsParserSafeHandles.Windows.cs</Link>
903901
</Compile>
902+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Windows.cs">
903+
<Link>Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Windows.cs</Link>
904+
</Compile>
904905
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs">
905906
<Link>Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs</Link>
906907
</Compile>
907908

908909
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Windows.cs" />
909910
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
910911
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectNative.cs" />
911-
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Windows.cs" />
912912
</ItemGroup>
913913

914914
<!-- Unix only -->
915915
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
916916
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\AdapterUtil.Unix.cs">
917917
<Link>Microsoft\Data\Common\AdapterUtil.Unix.cs</Link>
918918
</Compile>
919+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumerator.netcore.Unix.cs">
920+
<Link>Microsoft\Data\Sql\SqlDataSourceEnumerator.netcore.Unix.cs</Link>
921+
</Compile>
919922
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Unix.cs">
920923
<Link>Microsoft\Data\SqlClient\ConnectionPool\DbConnectionPoolIdentity.Unix.cs</Link>
921924
</Compile>
@@ -928,15 +931,24 @@
928931
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SessionHandle.netcore.Unix.cs">
929932
<Link>Microsoft\Data\SqlClient\SessionHandle.netcore.Unix.cs</Link>
930933
</Compile>
931-
932-
<Compile Include="Microsoft\Data\Sql\SqlDataSourceEnumerator.Unix.cs" />
934+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.netcore.Unix.cs">
935+
<Link>Microsoft\Data\SqlClinet\SqlColumnEncryptionCertificateStoreProvider.netcore.Unix.cs</Link>
936+
</Compile>
937+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.netcore.Unix.cs">
938+
<Link>Microsoft\Data\SqlClinet\SqlColumnEncryptionCngProvider.netcore.Unix.cs</Link>
939+
</Compile>
940+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlColumnEncryptionCspProvider.netcore.Unix.cs">
941+
<Link>Microsoft\Data\SqlClinet\SqlColumnEncryptionCspProvider.netcore.Unix.cs</Link>
942+
</Compile>
943+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Unix.cs">
944+
<Link>Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Unix.cs</Link>
945+
</Compile>
946+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlTypes\SqlFileStream.netcore.Unix.cs">
947+
<Link>Microsoft\Data\SqlTypes\SqlFileStream.netcore.Unix.cs</Link>
948+
</Compile>
949+
933950
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Unix.cs" />
934-
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.Unix.cs" />
935-
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Unix.cs" />
936-
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionCspProvider.Unix.cs" />
937-
<Compile Include="Microsoft\Data\SqlClient\SqlFileStream.Unsupported.cs" />
938951
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
939-
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
940952
</ItemGroup>
941953

942954
<!-- Resources -->

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlFileStream.Unsupported.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)