Remove package references to runtime and ref pack files when targeting .NET 6+.#1536
Remove package references to runtime and ref pack files when targeting .NET 6+.#1536AraHaan wants to merge 3 commits intodotnet:mainfrom
Conversation
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
|
Sad the CI does not have the .NET 6 SDK it looks like. |
|
@AraHaan we are adding net6 to driver build pretty soon. Maybe in preview 2 release. That will unblock some other features we are trying to add. |
|
Sad, too bad it cant be done right before the preview 1 release so we can see some simple configuration changes like this make their way into preview 1 as well (also so that way I do not have to wait long to notice the changes I made getting pulled into my codebase as well) thanks to having this as an indirect dependency from EFCore. |
| <PackageReference Include="Microsoft.Data.SqlClient.SNI.runtime" Version="$(MicrosoftDataSqlClientSNIRuntimeVersion)" /> | ||
| <PackageReference Condition="$(TargetGroup) == 'netcoreapp' " Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" /> | ||
| <PackageReference Condition="'$(TargetGroup)' == 'netstandard' or ('$(TargetGroup)' == 'netcoreapp' and '$(_TargetFrameworkVersionWithoutV)' <= '6.0')" Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" /> | ||
| <PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" /> |
There was a problem hiding this comment.
This will need to be made to not reference the nuget package versions of the assemblies in the normal runtime and ref pack files as well when targeting .NET 6+ (will require PR to their repo).
|
@JRahnama so maybe sometime in April. Mind adding this to the p2 or p3 milestone then so when it happens this can get merged when it's unblocked? |
|
@AraHaan I was going through this PR and made some testing. |
|
So would it be ok to eventually remove .NET Core 3.1 from SqlClient when that happens (to force users to update to .NET 6+) if they are not targeting .NET Framework using SqlClient? |
|
@JRahnama eta on when adding .NET 6 might be completed? |
We will resume working on this after first GA at the end of May. Since 3.1 EOL is Dec 3, 2022. |
|
Sad that the .NET 6 SDK (at least) cant be installed before then as it can be used to build the older TFMs still. |
|
After that I had to work around errors from the usage of:
And with that the codebase now builds with .NET 6 added (locally). |
…g .NET 6+. In .NET 6+ minimize network load on restore by using the ones from the ref and runtime packs over the package versions.
4db9a86 to
0fab613
Compare
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
Show resolved
Hide resolved
| <PackageReference Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), 3.1)))" 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)" /> |
There was a problem hiding this comment.
Microsoft.IdentityModel.Tokens (dependency of this) seems to needlessly depend on the Microsoft.CSharp, and the System.Security.Cryptography.Cng package.
When these 2 are fixed that would be a big help to me and others.
Signed-off-by: AraHaan <seandhunt_7@yahoo.com>
|
@JRahnama This PR seems obsolete now? |
|
Closing this PR as it is obsolete now. |
In .NET 6+ minimize network load on restore by using the ones from the ref and runtime packs over the package versions.