Monday, 14 July 2008

Build failed due to validation errors in. dbml

OK so I got in today to find that I was unable to build my current project, I got the following

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

I opened the projects dbml files to find that these files were fine, no errors or typos, the project was just dead. a little bit of Googling lead me to find that its a problem with Visual Studio 2008 not loading an assembly correctly, in particular the one with a GUID of 8D8529D3-625D-4496-8354-3DAD630ECC1B

In order to load the assembly correctly you need to get Visual Studio to reset it's packages, to do this:

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

You should now find that your project opens and builds correctly! I'm hoping that maybe SP1 of Visual Studio will correct this, if not SP2 maybe...

Update: SP1 Didn't fix this :( Also worth noting if you are running a 64 bit OS then the visual studio folder path is C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE

6 comments:

banusahwah said...

You are my hero! That saved my day.
Thanks,
-Rafi

newkie said...

Cheers! You saved my ass

Petulka77 said...

Thanks for posting it. You just saved me a lot of time!!!
Cheers

mr_davey said...

Thanks!

Evan said...

Thanks a lot for posting this. I ran into this today and couldn't understand why the hell my web service broke.

JayaRaja said...

its not solved it...
still am not able to complie my project... :(