Link to home
Start Free TrialLog in
Avatar of STEVEN WEBBER
STEVEN WEBBERFlag for United States of America

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=b77a5c561934e089' containing the base class 'System.Data.Linq.DataContext'. 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?
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Hi,

Go to solution explorer -> References -> Right Click -> Add Reference -> .Net -> System.Data.Linq

Tada!!
Avatar of STEVEN WEBBER

ASKER

I've already done that (several times, deleting the previous existin gone first).
ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fast and accurate response.