March 1, 2023
Have you ever received the following message when trying to open a Visual Studio database project?
“Analyzing Database Schema. Your database projects will be ready after #### operations are completed."
It is normal to see this from time to time, but it isn’t normal for the message to constantly be displayed and for your database project to be unresponsive. This happened to me for the first time recently. It caused me some down time before discovering what was causing the issue. Hopefully the following will same you some time and frustration.
The first thing I tried was closing Visual Studio and restarting, but the error still persisted. After doing a few web searches, I still wasn’t finding anything that would help solve the problem. Some people had gotten so frustrated that they ended up going to the extreme of reinstalling Visual Studio. Luckily in my case, I decided to look at the project files a little bit closer to see if possibly one them was the culprit.
In a database project, the model is persisted in a .dbml file. The purpose of the project .dbml file is to cache the model in order to help speed up opening and building the project. For some reason my .dbml file had gotten corrupted. One other clue that something had happened to this file was that when doing database schema compares, an error message about a cache identifier not existing was being displayed.
I decided to close the database project and rename the .dbml file. Once I opened the project back up, everything was working fine and I was back in business! I looked in the root directory of the project and the .dbml file had been recreated.
Thought I would share this tip. Hopefully you will never experience this situation, but if you do you now have a way to get back into your database project.