STEVEN WEBBER
asked on
Missing reference to System.Data.Linq
I have a newly created Website project in VS 2012. It indicates the Application Type is Class Library. I have the following code in my login module:
Imports GCF2014
Imports System.Data
Imports System.Data.Linq
Partial Class Account_Login
Inherits System.Web.UI.Page
Dim dc As gcfDataContext = New gcfDataContext
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
.
.
.
End If
End Sub
I get the following error when I try to run this module:
Compiler Error Message: BC30007: Reference required to assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 4e089' containing the base class 'System.Data.Linq.DataCont ext'. Add one to your project.
Source Error:
Line 6: Inherits System.Web.UI.Page
Line 7:
Line 8: Dim dc As gcfDataContext = New gcfDataContext
Line 9:
Line 10: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
I have System.Data.Linq in my list of references. I am running as ASP.Net 4.0.
Why am I getting this error?
Imports GCF2014
Imports System.Data
Imports System.Data.Linq
Partial Class Account_Login
Inherits System.Web.UI.Page
Dim dc As gcfDataContext = New gcfDataContext
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
.
.
.
End If
End Sub
I get the following error when I try to run this module:
Compiler Error Message: BC30007: Reference required to assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193
Source Error:
Line 6: Inherits System.Web.UI.Page
Line 7:
Line 8: Dim dc As gcfDataContext = New gcfDataContext
Line 9:
Line 10: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
I have System.Data.Linq in my list of references. I am running as ASP.Net 4.0.
Why am I getting this error?
ASKER
I've already done that (several times, deleting the previous existin gone first).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fast and accurate response.
Go to solution explorer -> References -> Right Click -> Add Reference -> .Net -> System.Data.Linq
Tada!!