发布定义 (TFS) 中的编码 UI 错误 entity framework
Coded UI in Release definition (TFS) error with entity framework
当我 运行 在本地测试 "coded UI" 来自 visual studio 2015 企业时,它们工作正常,但是当我 运行 它们来自 "release definition" ( TFS 版本 15.117.26714.0) 我收到此错误:
System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded . Make sure that the assembly-qualified name is used and that the assembly is available to the running application.
我不明白,因为我查看了 entity framework 个 DLL,它们在构建中:
EntityFramework.dll
Oracle.ManagedDataAccess.dll
Oracle.ManagedDataAccess.EntityFramework.dll
在本地工作正常,只有当您 运行 它们在 windows 2012 服务器上时才会在发布定义中发生。
如果 "Coded UI" 测试没有进入数据库,因此没有引用 "Entity Framework" 它在发布定义中正常工作。
请尝试以下项目以缩小问题范围:
- 确保您已经在 build/test 上安装了 Vistual Studio
机.
- 检查你的发布定义,确保你已经添加了 Nuget
安装程序 恢复软件包的步骤。
- 卸载 Entity Framework nuget 并重新安装。
- 检查
EntityFramework.SqlServer.dll
是否缺少任何
参考项目。如果是,只需将 nuget 包添加到其中
项目。
- 尝试通过 Nuget 安装最新的 EntityFramework
项目,然后重试。
参考这个类似的帖子:
当我 运行 在本地测试 "coded UI" 来自 visual studio 2015 企业时,它们工作正常,但是当我 运行 它们来自 "release definition" ( TFS 版本 15.117.26714.0) 我收到此错误:
System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded . Make sure that the assembly-qualified name is used and that the assembly is available to the running application.
我不明白,因为我查看了 entity framework 个 DLL,它们在构建中:
EntityFramework.dll
Oracle.ManagedDataAccess.dll
Oracle.ManagedDataAccess.EntityFramework.dll
在本地工作正常,只有当您 运行 它们在 windows 2012 服务器上时才会在发布定义中发生。
如果 "Coded UI" 测试没有进入数据库,因此没有引用 "Entity Framework" 它在发布定义中正常工作。
请尝试以下项目以缩小问题范围:
- 确保您已经在 build/test 上安装了 Vistual Studio 机.
- 检查你的发布定义,确保你已经添加了 Nuget 安装程序 恢复软件包的步骤。
- 卸载 Entity Framework nuget 并重新安装。
- 检查
EntityFramework.SqlServer.dll
是否缺少任何 参考项目。如果是,只需将 nuget 包添加到其中 项目。 - 尝试通过 Nuget 安装最新的 EntityFramework 项目,然后重试。
参考这个类似的帖子: