Linq to SQL strange error

|  Posted: December 8, 2009  |  Categories: General Technical
Tags: SQL

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

Author: Saravana Kumar

Saravana Kumar is the Founder and CTO of BizTalk360, an enterprise software that acts as an all-in-one solution for better administration, operation, support and monitoring of Microsoft BizTalk Server environments.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

Back to Top