VS 2017 with Xamarin - UWP app throws File Not Found on System.Threading.Thread RRS feed

  • Question

  • Im getting the following exception when using System.Data.Sqlclient in a Xamarin based UWP app.

    Does anyone know how to fix this?

    System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Thread, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Threading.Thread, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource 1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at SS12.DataServices.SendScalar(String qString) at SS12.ItemsPage.CheckUserLogin(String User, String Pwd) at SS12.ItemsPage.<Login_Clicked>d__3.MoveNext()

    • Moved by Breeze Liu Wednesday, January 24, 2018 2:10 AM off topic
    Tuesday, January 23, 2018 9:56 AM

All replies

  • For help with Xamarin please post in the Xamarin forums at http://forums.xamarin.com. That said, System.Data.SqlClient is not part of .Net Standard 2.0 and is not available to UWP apps. See https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection?view=netframework-4.7.1#Applies_to
    Tuesday, January 23, 2018 2:59 PM