What to do when Visual Studio fails

For the last 24 hours I had problems compiling one of specific project.

The project won’t compile because apparently: “O/R Designer validation failed for file: .dbml Error: The operation could not be completed. Unspecified error”. The weird thing was that I didn’t change anything in that project, in fact that project was not changed since the beginning of this year when a single comment was added in one of the project’s files.

It seems that the project was not to blame. Further checking of Visual Studio showed that indeed he was probably the cause of the problem.

To cut a long story short the problem was easily solved by running devenv /ResetSkipPkgs (- thanks Yury).


Visual Studio (devenv) has some other useful command line parameter you should know about:

  • SafeMode – When all else fails and you want to try and fix VS from inside.
  • ResetSettings – If VS won’t load because of invalid settings
  • ResetAddin – I’ve used this one to debug my own add-ins, or when one of my add-ins stops working.

Next time when VS  causes you grief and you contemplate on re-installing it (only takes 4 hours) try running devenv from the command line instead.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.