System.Data.Linq未加载到MVC.NET 4.5中
我在.NET4.5(VS2012)中有一个ASP.NETMVC4 Web应用程序项目。它是用VB编写的。 加载System.Data.Linq命名空间(包含所有类和子命名空间)失败。 项目的引用集为System.Data.Linq.dll 你知道问题出在哪里吗 当我尝试添加Linq2Sql类时,会收到这样的警告:System.Data.Linq未加载到MVC.NET 4.5中,linq,asp.net-mvc-4,Linq,Asp.net Mvc 4,我在.NET4.5(VS2012)中有一个ASP.NETMVC4 Web应用程序项目。它是用VB编写的。 加载System.Data.Linq命名空间(包含所有类和子命名空间)失败。 项目的引用集为System.Data.Linq.dll 你知道问题出在哪里吗 当我尝试添加Linq2Sql类时,会收到这样的警告: Namespace or type specified in the Imports 'System.Data.Linq' doesn't contain any public me
Namespace or type specified in the Imports 'System.Data.Linq' doesn't contain
any public member or cannot be found. Make sure the namespace or the type is
defined and contains at least one public member. Make sure the imported element
name doesn't use any aliases.
这些错误:
System.Data.Linq.DataContext
但这只是一个开始:如果我尝试使用System.Data.Linq命名空间中的任何内容,我会得到一个错误,例如,如果我尝试使用System.Data.Linq.Mapping.DatabaseAttribute,我会得到这样的错误:
Type 'System.Data.Linq.Mapping.DatabaseAttribute' is not defined.
我也有同样的问题,并且能够克服它。我不完全确定这些步骤中的哪一个解决了这个问题——但我就是这么做的
希望这能帮助您解决这个问题。我已经用错误信息更新了问题。