amaprog

Hi,

I'm using Visual C# Express Orcas Beta and i'm having a very strange problem.The Linq to Sql designer generated code won't compile.

I'm getting the following error messages:
The type or namespace name 'Association' does not exist in the namespace 'System.Data.Linq' (are you missing an assembly reference )

Using the generic type 'System.Data.Linq.Table<TEntity>' requires '1' type arguments

The type or namespace name 'Column' does not exist in the namespace 'System.Data.Linq' (are you missing an assembly reference )

The type or namespace name 'INotifyPropertyChanging' does not exist in the namespace 'System.Data.Linq' (are you missing an assembly reference )

The number of errors depends on the number of tables i want to map and the number of columns of each table.


Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

Jonathan.NET

I'm getting the same exact errors but I can't seem to find anything on goole to help us out...

It's quite frustrating because I'm really eager to try all the new LINQ features





Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

ben2004uk

Hello,

Not sure what the problem is. Have you modifed the code by hand in any way Are there associations between the tables on your designer Have you tried using another database Have you tried using SQLMetal - the command line tool which generates dbml files for a database

If you have tried all that, maybe upgrade to Beta 2

Sorry I can't be of more help at the moment.






Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

ralf_oop

I thought for this exists a fix but it is a problem with the beta 1, the new beta 2 hasn't it so upgrade to the newer version. It's worth ;-)






Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

knax

it is not a beta 1 bug , i just installed VStudio 2008 beta 2 and generated code wont compile with the exact same errors listed here




Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

MarcD

Has somebody bothered to note the exact steps required to replicate this bug




Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

knax

I have my DataLayer in one solution wich has a WebService + SqlMetal generated DataContext , everything worked fine until migration from VS Orcas Beta 1 -> VS 08 Beta2. The same exact solution compile fine under Microsoft Windows XP SP2 , but dosent on the Windows Server 2003 machine (wich is where the WS must be installed). If anyone has a workaround for this issue , i will re-post if i can figure out what the problem is.




Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

knax

1 - Remove the entire solution folder

2 - Copy a working version from another developpement pc

3 - Run & Recompile

This work (for now) and also worked yesterday but the problem seems to come back.





Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

knax

The above solution will just let the solution compile , but calling a webservice method from a client application will throw an exception (Could not load file or assembly 'System.Data.Linq, Version=2.0.0.0, Culture = neutral ........)

Now if i go under the solution , remove System.Data.Linq assembly fromt he solution then re-add it , im now back to the same point (3000errors) on sqlmetal generated file.

This bug needs a fix , the problem only persist when using my Win2k3 srv computer with all security updates.





Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

sloughin

Has anyone found a fix for this Unlike the others on this post, I am not using the designer to generate my code. However, I'm working through the Pialorsi/Russo book on Linq, and trying to set up a table with items from a join, but the problem I have is that there are items in each table that have the same column name.

When I tried to use the [Association ...] attribute, I got the error mentioned above. It seems that [Association] is not part of the System.Data.Linq library that shipped with Orcas Beta 2 Can anyone help, are we missing a library that we need to include here

THANKS!




Re: Visual C# Express 2008 (Pre-release) Linq to Sql designer generated code won't compile

Jay Hickerson MS

Hi,

A few things to check/try:

Make sure you have System.Data.Linq in your GAC and that the assembly version is 3.5.0.0. Also make sure that's the version your project is referencing.

When you look at the project references is there a yellow "!" icon next to the reference If so, that indicates that the version of System.Data.Linq your project references is not being found by VS. You should try deleting the reference and adding a new one.

Double-check that your application's target framework hasn't somehow been changed to something other than 3.5. The Linq To SQL features only work with the 3.5 framework.

HTH,