If you ever see this error trying to build your web setup project:

  • Error 1 Build failed due to validation errors in C:\…\DB.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. C:\…\DB.dbml

Do the following to fix visual studio.

  1. Close the Visual Studio project.
  2. Open a new command prompt
  3. Navigate to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
  4. Run Visual Sudio with the /resetskippkgs argument: devenv /resetskippkgs
  5. Open your solutions
  6. Build your web Setup project.

Where I found this solution:

http://blog.mjjames.co.uk/2008/07/build-failed-due-to-validation-errors.html