I am using an ASP.net Website project in VB.net and have added a LINQ to SQL data class to it in order to use a number of LinqDataSource controls. Yesterday my project worked fine but after shutting down last night and starting up this morning I now get this error:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'System.Data.Linq.Mapping.DatabaseAttribute' is not defined.
Source Error:
<Global.System.Data.Linq.Mapping.DatabaseAttribute(Name:="xxxx_pcf")> _
Partial Public Class PCFDataContext
Inherits System.Data.Linq.DataContext
This file is auto-generated by Visual Studio 2010 but it throws no errors. I only get the error at runtime.
Elsewhere on the internet people have recommended removing the Namespace declaration, only I don't have one.
I also found here somebody saying that the reference to System.Data.Linq
might be missing from the web.config file. Not for me though, my web.config is ok.
Also here a warning about VS renaming your classes for pluralization reasons - again not valid for me.
So I am stuck.