Cannot Access a Disposed Object – ModelStore

If you use the database schema compare tool in Visual Studio 2012 you may see the following error when trying to compare the database with the source:

Cannot access a disposed object. Object name: ‘ModelStore’

For me, this was arose after installing the June 2013 update 3 for Visual Studio 2012.

I resolved the error by running Clean Solution and rebooting my machine.

Hopefully this helps someone, as the error isn’t exactly helpful 🙂

This entry was posted in Visual Studio and tagged , . Bookmark the permalink.
0 0 votes
Article Rating
Notify of

Solve the maths problem shown below before posting: *

Inline Feedbacks
View all comments

I encountered this exact situation and couldn’t figure out what to do, so thanks for the write up! It’s amazing how often I forget to try turning it off and turning it on again.



I also encountered the same problem with VS2013.
It worked for me just with restarting VS and SQL Server services.

Hope it helps.