1
votes

After installing VS 2008 SP1, the LINQ to SQL Designer is not generating code. I get an error message:

Could not load type ' r' from assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

2

2 Answers

5
votes

This often happens if you have a partial class for the data-context (etc), and have a using statement before the namespace. Freaky, I know.

so if you have (in your partial class):

using Foo;
namespace Bar {
    //...
}

Try rearranging:

namespace Bar {
    using Foo;
    //...
}

I have no idea why, but this often fixes it. Note you might need to restart VS as well to get it working again, and maybe even go into the dbml designer.

0
votes

Its fixed, the problem was when Installing vs 2008 sp1, it haven't installed .net 3.5 sp1 automatically , i have manually installed .net 3.5 sp1 , its now working!