I’ve started to play with Linq2Sql ORM recently and the above error occurred when VS2008 tries to regenerate dbml file changes.

image

First time I didn’t find any other solution than to rebuild the dbml file from scratch. After a while I saw this error again. Google helped me to find out that it is very common problem and is connected to the usings inside the dbml codebihind.

The trick is if you have Northwind.dbml and Northind.cs file which starts with using clause:

using System;
namespace Northwind.DAL
{
    public partial class Product
    {

move the using inside namespace

namespace Northwind.DAL
{
    using System;
    public partial class Product
    {

and re-run Custom Tool from Northwind.dbml context menu in solution explorer. Unbelievable but it helps!

Submit this story to DotNetKicks

Posted in: linq2sql  Tags:

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

It took a half an hour today morning to clear the blog from comments like “I like the post, keep posting…”. I was wondering why those optimizers chose my blog to promote their sites and finally caught that my current theme creates a link at the top of a comment to the author site without rel=” nofollow”! Another reason is that I didn’t received any email notifications about new comments because of some curious filtering on the SMTP server I had in blog settings.

Now all links will have nofollow attribute so good buy spammers!

Submit this story to DotNetKicks

Posted in: blogengine.net  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5