Solved

System.Data.Linq not imported

Posted on 2012-12-27
3
776 Views
Last Modified: 2013-01-03
I just installed VS 2012.
In the file <dbname>designer.vb (generated in VS 2010) Visual Studio 2012 displays 100 errors  such as 'System.Data.Linq.DataContext' is not defined, although System.Data.Linq is present in References.

Additional information:

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be loaded.


=== Pre-bind state information ===
LOG: User = IIS APPPOOL\DefaultAppPool
LOG: DisplayName = System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 (Fully-specified)
LOG: Appbase = file:///E:/inetpub/IRISEL8/
LOG: Initial PrivatePath = E:\inetpub\IRISEL8\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\inetpub\IRISEL8\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/ea16591a/4859c991/System.Data.Linq.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/ea16591a/4859c991/System.Data.Linq/System.Data.Linq.DLL.
LOG: Attempting download of new URL file:///E:/inetpub/IRISEL8/bin/System.Data.Linq.DLL.
LOG: Attempting download of new URL file:///E:/inetpub/IRISEL8/bin/System.Data.Linq/System.Data.Linq.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/ea16591a/4859c991/System.Data.Linq.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/ea16591a/4859c991/System.Data.Linq/System.Data.Linq.EXE.
LOG: Attempting download of new URL file:///E:/inetpub/IRISEL8/bin/System.Data.Linq.EXE.
LOG: Attempting download of new URL file:///E:/inetpub/IRISEL8/bin/System.Data.Linq/System.Data.Linq.EXE.
0
Comment
Question by:DinuA
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Element1910
ID: 38725044
Make sure that it's referenced in your web.config

<add assembly=“System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089“ />

Open in new window


Replace Version with your version of .NET you are using, or the version that is referenced.

This should have been set when you added your reference to your project automatically, but maybe you made some changes to your web.config without knowing.
0
 

Author Comment

by:DinuA
ID: 38726390
Thanks for your hint.
According to Reference Manager the version of System.Data.Linq is 4.0.0.0.
I don't know how to verify the PublicKeyToken.
0
 
LVL 7

Accepted Solution

by:
Element1910 earned 500 total points
ID: 38728393
Try to make sure this is in your web.config:

<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

Open in new window



This PublicKeyToken is for Linq 4.0.0.0
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now