56

What's the purose of .vsmdi file? Do I need to check into the source control system?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
user705414
  • 20,472
  • 39
  • 112
  • 155
  • 1
    Possible duplicate of **[Why does Visual Studio create a new .vsmdi file?](http://stackoverflow.com/questions/28171/why-does-visual-studio-create-a-new-vsmdi-file)** – Anson Sep 26 '11 at 04:55

2 Answers2

58

The VSMDI file is created by Visual Studio when you create a test project for the first time. It contains a list of all tests that Visual Studio can find in your solution assemblies and allows you to divide your tests into so-called test lists. These test lists can be used to categorize your tests and let you select a subset of tests for execution.

You can use this mechanism for running sub-selections. However, you can also (freely) assign multiple test categories to a test, which enables you to achieve the same, in a more flexible way. And with the known issues with VSMDI files, like uncontrolled duplication of these files and obsolete tests being listed with a warning icon, it might seem the better way to do things like this.

My overall suggestion is: check-in your default generated .vsmdi file. This will prevent Visual Studio from (re-)generating such files on your own and your team members systems when new test projects are added. Decide on usage of test lists or assigning categories to tests directly based on your usage experience. Test lists are easy to start with, but less suitable is you want to have flexibility for a large set of tests.

davmos
  • 9,324
  • 4
  • 40
  • 43
kroonwijk
  • 8,340
  • 3
  • 31
  • 52
  • More info [here](http://stackoverflow.com/questions/7183028/how-important-is-visual-studios-vsmdi-file). – LosManos Mar 18 '15 at 07:14
  • Might want to edit in the fact that test lists have been deprecated – jmoreno Feb 25 '22 at 15:46
  • @jmoreno can you give the source? – Monsignor Jun 01 '22 at 15:42
  • @Monsignor: Test lists were 2010, and deprecated in 2012 not Ms links but…. https://docs.telerik.com/teststudio/archived-docs/results/visual-studio-2012-and-later-test-list, https://stackoverflow.com/questions/12527701/vs2010s-test-list-editor-functionality-in-vs2012-update – jmoreno Jun 02 '22 at 03:44
  • @jmoreno thanks, the modern alternative seems to be "Test Playlists" (*.playlist). – Monsignor Jun 02 '22 at 04:58
10

It's used for Testing in Visual Studio. If you don't do testing in Visual Studio, I wouldn't worry about it. But if you do, and you have hundreds of tests it might be worth keeping.

Joey
  • 361
  • 1
  • 4
  • 9
    This is a reasonable answer, Joey was obviously trying to help. Down voting answers like this is just silly... – Daryn Jul 23 '14 at 08:50
  • 1
    I didn't downvote but I agree that the answer isn't really helpful. It's obvious that those files have something to do with testing by just opening one in Notepad. But to answer the question "Do I need to check into the source control system?" I need more details. – Paul B. Oct 13 '16 at 15:04