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 🙂

2 comments

  1. Will says:

    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.

  2. Alejandro says:

    Hi,

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

    Hope it helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve the maths problem shown below before posting: *

Follow

Get every new post delivered to your Inbox

Join other followers: