试图将Entity Framework MVC3应用程序部署到专家ASP.NET共享主机,得到奇怪的错误?

时间:2013-09-03 23:16:03

标签: asp.net-mvc asp.net-mvc-3 entity-framework entity-framework-4 entity-framework-5

我有一个2项目MVC3 .NET 4,EF5 Web应用程序,我刚尝试“一键式”发布到我的DiscountASP帐户,该帐户安装了MS SQL Server 2008实例。

我得到的错误是:

Schema specified is not valid. Errors:

OrdersDB.csdl(2,9) : warning 0005: Could not find schema information for the attribute          
'Namespace'.

OrdersDB.csdl(2,38) : warning 0005: Could not find schema information for the attribute 'Alias'.

OrdersDB.csdl(2,288) : error 0005: The 'http://schemas.microsoft.com/ado/2009/02/edm
/annotation:UseStrongSpatialTypes' attribute is not declared.

OrdersDB.csdl(2,2) : error 0010: The element Schema in namespace http://schemas.microsoft.com   
/ado/2009/11/edm was unexpected for the root element. The expected Schema in one of the 
following namespaces: http://schemas.microsoft.com/ado/2006/04/edm, http://schemas.microsoft.com/ado/2007/05/edm, http://schemas.microsoft.com/ado/2008/09/edm.

有什么想法吗?

我只是发布了Web项目,而不是包含POCO的DB项目。我不相信我需要这样做,因为DLL被拉入Web项目。

提前致谢。

1 个答案:

答案 0 :(得分:0)

通过降级到EF4.1

对此进行排序

基本上EF5不能在W2K8上运行,除非它有我的主机没有的.NET4.5。我的开发服务器使用EF DLL编译为.NET4,但也许我的开发服务器上有.NET4.5,因此它正在工作。我注意到EF5 DLL在属性下被标记为DLL.4。

希望这有助于某人。