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

Enhancement | Add explicit version for major .NET version dependencies #2303

Merged
merged 8 commits into from Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Expand Up @@ -985,28 +985,38 @@
<LogicalName>Microsoft.Data.SqlClient.SqlMetaData.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Condition="$(TargetGroup) == 'netstandard' and '$(TargetsWindows)' == 'true' and '$(IsUAPAssembly)' != 'true'" Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
<PackageReference Condition="'$(TargetsWindows)' == 'true' and '$(IsUAPAssembly)' != 'true'" Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
ErikEJ marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersionNet8)" />
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersionNet8)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient.SNI.runtime" Version="$(MicrosoftDataSqlClientSNIRuntimeVersion)" />
<!-- Enable the project reference for debugging purposes. -->
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Buffers" Version="$(SystemBuffersVersion)" />
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
<PackageReference Condition="$(BuildForRelease) == 'true'" Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All" />
</ItemGroup>
</ItemGroup>
DavoudEshtehari marked this conversation as resolved.
Show resolved Hide resolved
<Import Project="$(ToolsDir)targets\GenerateThisAssemblyCs.targets" />
<Import Project="$(ToolsDir)targets\ResolveContract.targets" Condition="'$(OSGroup)' == 'AnyOS'" />
<Import Project="$(ToolsDir)targets\NotSupported.targets" Condition="'$(OSGroup)' == 'AnyOS'" />
Expand Down
Expand Up @@ -338,8 +338,6 @@
<ProjectReference Include="$(AddOnsPath)AzureKeyVaultProvider\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj" />
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="$(MicrosoftIdentityModelClientsActiveDirectoryVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
<PackageReference Condition="'$(TargetGroup)'=='netfx'" Include="Microsoft.SqlServer.Types" Version="$(MicrosoftSqlServerTypesVersion)" />
Expand Down
Expand Up @@ -21,7 +21,6 @@
<ProjectReference Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions tools/props/Versions.props
Expand Up @@ -40,9 +40,11 @@
<MicrosoftWin32RegistryVersion>5.0.0</MicrosoftWin32RegistryVersion>
<MicrosoftDataSqlClientSNIRuntimeVersion>5.2.0-preview1.23340.1</MicrosoftDataSqlClientSNIRuntimeVersion>
<SystemConfigurationConfigurationManagerVersion>6.0.1</SystemConfigurationConfigurationManagerVersion>
<SystemConfigurationConfigurationManagerVersionNet8>8.0.0</SystemConfigurationConfigurationManagerVersionNet8>
<MicrosoftSqlServerServerVersion>1.0.0</MicrosoftSqlServerServerVersion>
<SystemDiagnosticsPerformanceCounterVersion>6.0.1</SystemDiagnosticsPerformanceCounterVersion>
<SystemRuntimeCachingVersion>6.0.0</SystemRuntimeCachingVersion>
<SystemRuntimeCachingVersionNet8>8.0.0</SystemRuntimeCachingVersionNet8>
ErikEJ marked this conversation as resolved.
Show resolved Hide resolved
<SystemSecurityCryptographyCngVersion>5.0.0</SystemSecurityCryptographyCngVersion>
<SystemSecurityPermissionsVersion>6.0.0</SystemSecurityPermissionsVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
Expand Down
12 changes: 4 additions & 8 deletions tools/specs/Microsoft.Data.SqlClient.nuspec
Expand Up @@ -45,11 +45,9 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.35.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.35.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.1" 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.Configuration.ConfigurationManager" version="8.0.0" exclude="Compile" />
<dependency id="System.Diagnostics.DiagnosticSource" version="8.0.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="8.0.0" exclude="Compile" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.2.0-preview1.23340.1" exclude="Compile" />
Expand All @@ -60,12 +58,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
<dependency id="System.Configuration.ConfigurationManager" version="6.0.1" 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" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.2.0-preview1.23340.1" exclude="Compile" />
<dependency id="Azure.Identity" version="1.8.0" />
<dependency id="Azure.Identity" version="1.10.3" />
<dependency id="Microsoft.Identity.Client" version="4.56.0" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.35.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.35.0" />
Expand Down