What is the function of the DBMDL file in a visual studio database project?
Asked
Active
Viewed 5.3k times
1 Answers
432
From what I can make out, it is a serialized file of your db model and is used as a cache for improving the performance of deployment. It is unique per user thus should not be checked into source control.

Cameron McGrane
- 4,865
- 1
- 20
- 17
-
3When creating a new SQL 2008 Database Project VisualSVN automatically elects not to check this file in so that also suggests to me that it's not a good idea to check it in to source control. – rohancragg Nov 29 '10 at 10:32
-
3Oddly enough, when I remove these dbmdl files, opening the solution results in a "contains a reference to a project which does not exist" error from database project to server project that doesn't show up again on subsequent loads. – Mayo Dec 31 '10 at 16:10
-
14That's because the dbmdl file contains the reference, and deleting it causes the error message. The file is then re-generated by Visual Studio and the error goes away. – belugabob Sep 09 '11 at 07:28
-
19Wish I could add another +1 for the source control comment even though it was not even asked. – strider Nov 30 '15 at 01:11
-
When I first created a "SQL Server Database" project in Visual Studio 2017, it automatically created a `
.dbmdl` file. But at some point after I added some tables and built the project, the ` – Mike Finch Sep 20 '20 at 00:42.dbmdl` file disappeared. I seem to be able to carry on without it. Good to know it is not something to submit to source control. -
1If your next question is to check what is the JFM file, is almost the same than DBML, started to appear after a specific Windows upgrade. – Yogurtu Apr 20 '22 at 02:42