Linq to SQL strange error

Posted at: 12/8/2009 at 1:55 PM by saravana

Currently I'm using Linq to SQL in one of my internal projects. After adding a stored procedure to the designer, I started to see the following error "The custom tool 'MSLinqToSQLGenerator' failed. Unspecified error" and my LinqToSql auto-generated .cs file disappeared from the project. I tried various things like restarting VS (btw its VS 2008 with SP1), closing all the open source files, even going to the extend of deleting the complete .dbml and dbml.layout files etc.

I received the same error, when I attempted to run the tool by right-clicking on the .dbml file and selecting "Run Custom Tool", but this time, it tried to open the source file where I used the DataContext class.

This is the solution that worked for me. I Simply excluded that file which used the DataContext class and executed the "Run Custom Tool" again, it worked flawlessly this time, then I included the file back again.

HTH

Saravana

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
 
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading