Reputation: 1761
I have an ASP.NET MVC4 Web Application project in .NET 4.5 (VS 2012). It is in VB. It fails loading System.Data.Linq namespace (with all classes and sub-namespaces). Project has a reference set to System.Data.Linq.dll.
Any ideas where is the problem?
When I try to add Linq2Sql classes, I get such warning:
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.
and such errors:
System.Data.Linq.DataContext
But this is just a beginning: if I try to use anything from System.Data.Linq namespace I get an error, for example if I try to use System.Data.Linq.Mapping.DatabaseAttribute, I get such error:
Type 'System.Data.Linq.Mapping.DatabaseAttribute' is not defined.
Upvotes: 0
Views: 547
Reputation: 46
I had this same problem - and was able to get past it. I'm not entirely sure which of these steps resolved the issue - but this is what I did.
Hope that helps you get around this.
Upvotes: 1