Build failed due to validation errors in Visual Studio 2008

I guess you will be finding the error when you compile the Linq to Sql Datasource in Visual studio 2008.  After adding a LINQ To SQL item to a project, Setup Projects in the same solution begin to fail on build. 

Well something like this “Error 1 Build failed due to validation errors in C:\projects2008\TimeTrakker\TimeTrakkerBusiness\model\TimeTrakker.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. C:\projects2008\TimeTrakker\TimeTrakkerBusiness\model\TimeTrakker.dbml”

To fix this run


  • Open a new command prompt
  • Navigate to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
  • Run Visual Sudio with the /resetskippkgs argument: devenv /resetskippkgs


    This fires up Visual Studio and reloads all packages that were previously skipped.

    If  still you find the problem

    1. Close VS 2008.
    2. Open the project file containing the LINQ To SQL item in Notepad.
    3. Remove the following lines:
         <Service Include=”{3259AA49-8AA1-44D3-9025-A0B520596A8C}” />

    The Setup Project will now build successfully. However, if you double-click the DBML file to open the designer in VS 2008 the Setup Project will stop building again. The above lines do *not* get re-added to the project file but the Setup Project will stop building anyway. Just restart VS 2008 and it will work again — until you open the DBML designer again. Once the Setup Project fails due to this problem it will never build successfully until after you restart VS 2008. 

    Still more fixes for it are



    I don’t know if this will help.
    1. Open up VS2008
    2. Right click on the solution and select “Clean Solution”.
    If you want to avoid this problem only on one machine (in my case : on the Team Build server), delete the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Services\{3259AA49-8AA1-44d3-9025-A0B520596A8C}
    Tagged on: ,

    Leave a Reply

    Your email address will not be published. Required fields are marked *