I am creating an Azure Function in C# using a target framework of netstandard2.0
in a Windows 10 environment. The function calls a method that's in another class library and that method creates an instance of SqlConnection. When I run the function I get the following exception:
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.RefreshImages ---> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ---> System.PlatformNotSupportedException : System.Data.SqlClient is not supported on this platform. at System.Data.SqlClient.SqlConnection..ctor(String connectionString)......
Obviously SqlConnection is supported on Windows so I assume there's something else going on here.