296

What is the function of the DBMDL file in a visual studio database project?

Maslow
  • 18,464
  • 20
  • 106
  • 193
Jet Basrawi
  • 3,185
  • 2
  • 15
  • 14

1 Answers1

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
  • 3
    When 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
  • 3
    Oddly 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
  • 14
    That'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
  • 19
    Wish 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 `.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. – Mike Finch Sep 20 '20 at 00:42
  • 1
    If 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