Entity Framework Provider Type Not Loading on TeamCity
When attempting to run tests on TeamCity, users may encounter the following exception:
System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' for the 'System.Data.SqlClient' ADO.NET provider could not be loaded. Make sure the provider assembly is available to the running application.
Troubleshooting
To resolve this issue, ensure that the EntityFramework.SqlServer NuGet package is installed in the project experiencing the error. This package contains the necessary provider assembly for Entity Framework to load.
Additional Considerations
<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> </entityFramework>
Additional Troubleshooting Steps from Community
The above is the detailed content of Why Isn't My Entity Framework Provider Loading on TeamCity?. For more information, please follow other related articles on the PHP Chinese website!