Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add | Adding support for net 7.0 #1981

Merged
merged 6 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Otherwise>
<PropertyGroup>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetstandard' OR '$(TestTargetOS)' == 'Unixnetstandard'">netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net462</TargetFrameworks>
</PropertyGroup>
</Otherwise>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
Expand Down
3 changes: 3 additions & 0 deletions src/Microsoft.Data.SqlClient/netcore/src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ csharp_style_implicit_object_creation_when_type_is_apparent = false

# IDE0063: Use simple 'using' statement
csharp_prefer_simple_using_statement = false

# SYSLIB0039: Type or member is obsolete
dotnet_diagnostic.SYSLIB0039.severity = suggestion
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.Data.SqlClient</AssemblyName>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">Microsoft.Data.SqlClient is not supported on this platform.</GeneratePlatformNotSupportedAssemblyMessage>
<OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>PerformanceTests</AssemblyName>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<Configurations>Debug;Release;</Configurations>
<IntermediateOutputPath>$(ObjFolder)$(Configuration).$(Platform).$(AssemblyName)</IntermediateOutputPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<StartupObject>Microsoft.Data.SqlClient.ExtUtilities.Runner</StartupObject>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<PackageType>MSBuildSdk</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
33 changes: 33 additions & 0 deletions tools/specs/Microsoft.Data.SqlClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
</group>
<group targetFramework="net7.0">
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.1.0" exclude="Compile" />
<dependency id="Azure.Identity" version="1.8.0" />
<dependency id="Microsoft.Identity.Client" version="4.47.2" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.24.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.24.0" />
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
<dependency id="System.Configuration.ConfigurationManager" version="6.0.1" exclude="Compile" />
<dependency id="System.Diagnostics.DiagnosticSource" version="6.0.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
<dependency id="System.Security.Cryptography.Cng" version="5.0.0" />
<dependency id="System.Security.Principal.Windows" version="5.0.0" exclude="Compile" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.1.0" exclude="Compile" />
<dependency id="Azure.Identity" version="1.8.0" />
Expand Down Expand Up @@ -98,6 +113,11 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<reference file="Microsoft.Data.SqlClient.pdb" />
<reference file="Microsoft.Data.SqlClient.xml" />
</group>
<group targetFramework="net7.0">
<reference file="Microsoft.Data.SqlClient.dll" />
<reference file="Microsoft.Data.SqlClient.pdb" />
<reference file="Microsoft.Data.SqlClient.xml" />
</group>
<group targetFramework="net6.0">
<reference file="Microsoft.Data.SqlClient.dll" />
<reference file="Microsoft.Data.SqlClient.pdb" />
Expand All @@ -124,6 +144,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$\Microsoft.Data.SqlClient\ref\net462\Microsoft.Data.SqlClient.xml" target="ref\net462\" exclude="" />

<!-- ref NetCore -->
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net7.0\Microsoft.Data.SqlClient.dll" target="ref\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net7.0\Microsoft.Data.SqlClient.pdb" target="ref\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net7.0\Microsoft.Data.SqlClient.xml" target="ref\net7.0\" exclude="" />

<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net6.0\Microsoft.Data.SqlClient.dll" target="ref\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net6.0\Microsoft.Data.SqlClient.pdb" target="ref\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$\Microsoft.Data.SqlClient\ref\net6.0\Microsoft.Data.SqlClient.xml" target="ref\net6.0\" exclude="" />
Expand Down Expand Up @@ -155,6 +179,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netfx\Microsoft.Data.SqlClient.xml" target="lib\net462\" exclude="" />

<!-- lib NetCore -->
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.dll" target="lib\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.pdb" target="lib\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.xml" target="lib\net7.0\" exclude="" />

<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.dll" target="lib\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.pdb" target="lib\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.xml" target="lib\net6.0\" exclude="" />
Expand All @@ -173,6 +201,11 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netfx\Microsoft.Data.SqlClient.pdb" target="runtimes\win\lib\net462\" exclude="" />

<!-- runtimes NetCore -->
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.dll" target="runtimes\win\lib\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.pdb" target="runtimes\win\lib\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.dll" target="runtimes\unix\lib\net7.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net7.0\Microsoft.Data.SqlClient.pdb" target="runtimes\unix\lib\net7.0\" exclude="" />

<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.dll" target="runtimes\win\lib\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.pdb" target="runtimes\win\lib\net6.0\" exclude="" />
<file src="..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\Microsoft.Data.SqlClient\netcore\net6.0\Microsoft.Data.SqlClient.dll" target="runtimes\unix\lib\net6.0\" exclude="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyStoreProvider.SqlColumnEncrypti
<dependency id="Azure.Security.KeyVault.Keys" version="[4.4.0,5.0.0)" />
<dependency id="Microsoft.Extensions.Caching.Memory" version="6.0.1" />
</group>
<group targetFramework="net7.0">
<dependency id="Microsoft.Data.SqlClient" version="3.0.0" />
<dependency id="Azure.Core" version="[1.25.0,2.0.0)" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
<dependency id="Azure.Security.KeyVault.Keys" version="[4.4.0,5.0.0)" />
<dependency id="Microsoft.Extensions.Caching.Memory" version="6.0.1" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.Data.SqlClient" version="3.0.0" />
<dependency id="Azure.Core" version="[1.25.0,2.0.0)" />
Expand Down Expand Up @@ -62,6 +69,16 @@ Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyStoreProvider.SqlColumnEncrypti
<file src="..\..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\AzureKeyVaultProvider\net462\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb" target="runtimes\win\lib\net462\" exclude="" />

<!-- NetCore Files -->
<file src="..\..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="lib\net7.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="runtimes\win\lib\net7.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="runtimes\unix\lib\net7.0\" exclude="" />

<file src="..\..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb" target="lib\net7.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb" target="runtimes\win\lib\net7.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb" target="runtimes\unix\lib\net7.0\" exclude="" />

<file src="..\..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\AzureKeyVaultProvider\net7.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.xml" target="lib\net7.0\" exclude="" />

<file src="..\..\..\artifacts\Project\bin\AnyOS\$Configuration$.AnyCPU\AzureKeyVaultProvider\net6.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="lib\net6.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Windows_NT\$Configuration$.AnyCPU\AzureKeyVaultProvider\net6.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="runtimes\win\lib\net6.0\" exclude="" />
<file src="..\..\..\artifacts\Project\bin\Unix\$Configuration$.AnyCPU\AzureKeyVaultProvider\net6.0\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" target="runtimes\unix\lib\net6.0\" exclude="" />
Expand Down
2 changes: 1 addition & 1 deletion tools/targets/NotSupported.targets
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<GenAPIArgs>$(GenAPIArgs) -o:"$(NotSupportedSourceFile)"</GenAPIArgs>
<GenAPIArgs Condition="'$(GeneratePlatformNotSupportedAssembly)' == 'true' OR '$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(GenAPIArgs) -t:"$(GeneratePlatformNotSupportedAssemblyMessage)"</GenAPIArgs>
<GenAPIArgs Condition="'$(GeneratePlatformNotSupportedAssemblyWithGlobalPrefix)' == 'true'">$(GenAPIArgs) -global</GenAPIArgs>
<GenAPIPath Condition="'$(MSBuildRuntimeType)' == 'core'"> "$(DotNetCmd) $(ToolsArtifactsDir)net6.0\Microsoft.DotNet.GenAPI.dll"</GenAPIPath>
<GenAPIPath Condition="'$(MSBuildRuntimeType)' == 'core'"> "$(DotNetCmd) $(ToolsArtifactsDir)$(TargetFramework)\Microsoft.DotNet.GenAPI.dll"</GenAPIPath>
<GenAPIPath Condition="'$(MSBuildRuntimeType)' != 'core'"> "$(ToolsArtifactsDir)net472\Microsoft.DotNet.GenAPI.exe"</GenAPIPath>
</PropertyGroup>
<Exec Command="$(GenAPIPath) $(GenAPIArgs)" WorkingDirectory="$(ToolRuntimePath)"/>
Expand Down