Friday, August 26, 2011

Build failed due to validation errors in .dbml

If you ever used Linq 2 Sql you probably encountered this error (if you haven’t – don’t worry, you will :) 

Error 180 Build failed due to validation errors in .dbml.  

Open the file and resolve the issues in the Error List, then try rebuilding the project.
Luckily there is a workaround to this issue: 

1) open Visual Studio Command Prompt and run Visual Studio with /resetskippkgs parameter.
devenv /resetskippkgs

Unfortunately it doesn’t work all the times, so another workaround that you can try is to edit project file:
1) open project file in text editor
2) remove (or comment out) following lines: 

   1: <ItemGroup> 
   2:      <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" /> 
   3: ItemGroup>
3) You may have to restart visual studio at this point.
And that’s it :) 

1 comment:


    i was getting same error in my project. i am using vs2008. i have tried devenv /resetskippkgs this command, but its not working from my side.

    Could you please explain to me fully, what i have to do.