I am running an azure function v3 (.NET Core 3.1) which is calling entity framework code inside a .NET 4.6.1 class library.
When the calling code is executed I get this exception:
Could not load file or assembly 'System.Data.SqlClient, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (0x80131621)
I tried to install the nuget System.Data.SqlClient 4.6.1 in the azure function project but it got reject because:
NU1605: Detected package downgrade: System.Data.SqlClient from 4.7.0 to 4.6.1. Reference the package directly from the project to select a different version.
MyAzureFunctionProject -> EntityFramework 6.3.0 -> System.Data.SqlClient (>= 4.7.0)
MyAzureFunctionProject -> System.Data.SqlClient (>= 4.6.1)
Package restore failed. Rolling back package changes for 'MyAzureFunctionProject'.
What should I do now to fix the exception and from where is the 4.6.1 version coming ??? I have no nuget with 4.6.1 installed!
User contributions licensed under CC BY-SA 3.0