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 🙂
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.
Hi,
I also encountered the same problem with VS2013.
It worked for me just with restarting VS and SQL Server services.
Hope it helps.