Linq to Sql designer generated code won''t compile
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.
[829 byte] By [
amaprog] at [2008-2-5]
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.
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.
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.
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.