You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
M.D.SqlClient binaries that targets .NET Framework contain reference to library System.Net.Http 4.2.0.0, which is higher than the version included in the frameworks 4.0.0.0.
This is observed in library versions 3.1.3 by us, and 5.x according to #1834. However, in library version 2.1.5 the included reference was correctly System.Net.Http 4.0.0.0.
To reproduce
I have created this mini project to reproduce this issue. MDSMiniProject.zip It's essentially an empty C# console app that targets .NET Framework 4.6.2 and references M.D.SqlClient explicitly.
When building this project, it gives the following warning:
warning MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved.
warning MSB3277: There was a conflict between "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
warning MSB3277: "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
warning MSB3277: References which depend on "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Net.Http.dll].
warning MSB3277: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Net.Http.dll
warning MSB3277: Project file item includes which caused reference "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Net.Http.dll".
warning MSB3277: System.Net.Http
warning MSB3277: References which depend on "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
warning MSB3277: MDSMiniProject\Microsoft.Data.SqlClient.dll
warning MSB3277: Project file item includes which caused reference "MDSMiniProject\Microsoft.Data.SqlClient.dll".
warning MSB3277: Microsoft.Data.SqlClient
Expected behavior
The binaries should refer to System.Net.Http 4.0.0.0 so that it matches the minimum targeted framework version.
Further technical details
Microsoft.Data.SqlClient version: 3.1.3
.NET target: .NET Framewrk 4.6.2
SQL Server version: Azure SQL
Operating system: Windows 11
Additional context
Image showing 3.1.3 referencing 4.2.0.0:
Image showing 2.1.5 referencing 4.0.0.0:
Image showing the reference assembly included in .NET Framework 4.6.2:
The text was updated successfully, but these errors were encountered:
@jim-du I was able to see that in your repro, but when I looked into installed packages Microsoft.Data.SqlClient was not installed properly. For test, just go to Tools>Nuget Package Manager>Manage Nuget Packages for Solution and reinstall v3.1.3. The warning wont come up. Let us know about the result. Thanks.
Describe the bug
M.D.SqlClient binaries that targets .NET Framework contain reference to library
System.Net.Http 4.2.0.0
, which is higher than the version included in the frameworks4.0.0.0
.This is observed in library versions
3.1.3
by us, and5.x
according to #1834. However, in library version2.1.5
the included reference was correctlySystem.Net.Http 4.0.0.0
.To reproduce
I have created this mini project to reproduce this issue. MDSMiniProject.zip It's essentially an empty C# console app that targets .NET Framework 4.6.2 and references M.D.SqlClient explicitly.
When building this project, it gives the following warning:
Expected behavior
The binaries should refer to
System.Net.Http 4.0.0.0
so that it matches the minimum targeted framework version.Further technical details
Microsoft.Data.SqlClient version: 3.1.3
.NET target: .NET Framewrk 4.6.2
SQL Server version: Azure SQL
Operating system: Windows 11
Additional context
Image showing 3.1.3 referencing 4.2.0.0:
Image showing 2.1.5 referencing 4.0.0.0:
Image showing the reference assembly included in .NET Framework 4.6.2:
The text was updated successfully, but these errors were encountered: