No Entity Framework provider with the fixed name "System. Data. SqlClient" was found for issues encountered when using Entity Framework. Make sure that the provider is registered in the "entityFramework" section of the application configuration file. The provider is not found in ado.
Problem description:
The following error is reported when you use Entity Framework to retrieve data:
The Entity Framework provider with the fixed name "System. Data. SqlClient" is not found. Make sure that the provider is registered in the "entityFramework" section of the application configuration file. For more information, see http://go.microsoft.com/fwlink? LinkId = 260882.
Here, the logic code of Entity Framework is encapsulated in a class library project, and the other is a console application. In the console, the application references the class library project and reads data from the console project, the problem is that although the class library project references the Entity Framework, the console project does not reference the Entity Framework, thus the EntityFramework is missing. sqlServer. dll
The solution is to copy EntityFramework. SqlServer. dll to the compilation output directory of the console project, or the console project also references Entity Framework (after compilation, EntityFramework. SqlServer. dll will be available)