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

21 comments:

Unknown said...

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

Unknown said...

Cheers! You saved my ass

Petulka77 said...

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

Dave Seng 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... :(

Michael Soutar said...

Awesome dude! Thanks heaps you saved me wasting hours on something that I didn't do. :)

Prodis said...

This information help me to build my projects with .dbml errors.
Thank you.

Unknown said...

Cool...thanks a Ton!!!

Unknown said...

thank you!

Rafael said...

Thank you! I ran into this Today, trying to deploy my solution to QA. It didn't make any sense.

Unknown said...

Wow. Awesome.

Unknown said...

thanks a lot

ksolademi said...
This comment has been removed by the author.
ksolademi said...

Thanks for the post ... I don't know why it worked, but it did. This problem occurred after doing nothing more than restarting my computer. VS is too big for its own good.

JarleF said...

Error removed after uninstalling TFS Sidekicks

elLoco said...

I got this error after adding a new stored proc to my dbml. Reverting to the last known good version in subversion and simply adding the same stored proc again fixed the issue.
It seems under some circumstances the dbml can get corrupted.

Unknown said...

guy, u are a blessing!... Thanks so much.
-Michael

Unknown said...

Awesome....u saved my day! Thanx
-tope

Jams said...

last night a scouser saved my ass

nilanjan said...

Thanks James.... :)... I have been struggling to solve this for at least a month now...

-- nil