Entity Framework provider loading issue during tests on TeamCity
You are encountering an issue where the Entity Framework provider for SQL Server cannot be loaded when running unit tests on TeamCity.
The error message suggests that the provider assembly, System.Data.Entity.SqlServer.SqlProviderServices, is not available to the application during the test runtime. To resolve this, follow these steps:
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
In your specific case, the stack trace suggests that the EntityFramework.SqlServer.dll assembly is missing from the test project or the test runner process. Verify the references and copy settings for this assembly.
By following these steps, you should be able to resolve the issue and successfully run your unit tests on TeamCity using Entity Framework.
The above is the detailed content of Why Can't My Entity Framework Tests Load on TeamCity?. For more information, please follow other related articles on the PHP Chinese website!