我在 .NET 4.5(VS 2012)中有一个 ASP.NET MVC4 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 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.