Rockford Lhotka

 Thursday, August 23, 2018
« In place list editing in Razor Pages | Main | A simple flow for using git and pull req... »

Does anyone understand how System.Data.SqlClient assemblies get pulled into projects?

I have a netstandard 2.0 project where I reference System.Data.SqlClient. I then reference/use that assembly in a Xamarin project. And this seems to work, but creates a compile-time warning in the Xamarin project

The assembly 'System.Data.SqlClient.dll' was loaded from a different 
  path than the provided path

provided path: /Users/user135287/Library/Caches/Xamarin/mtbs/builds/
  UI.iOS/4a61fb5d59d8c2875723f6d1e7f44ce3/bin/iPhoneSimulator/Debug/
  System.Data.SqlClient.dll

actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/
  11.6.1.4/lib/mono/Xamarin.iOS/Facades/System.Data.SqlClient.dll

I don't think the warning actually causes any issues - but (like a lot of people) I dislike warnings during my builds. Sadly, I don't know how to get rid of this particular warning.

I guess I also don't know if it has anything to do with my Class Library project using System.Data.SqlClient, or maybe this is just a weird thing with Xamarin iOS?