<p>If I open a solution in Visual Studio 2008 and run a unit test then VS creates a new .vsmdi file in the Solution Items folder and gives it the next number available e.g. My Solution2.vsmdi.</p>

<p>Any idea why VS is doing this and how I can get it to stop doing this?</p>

[{'answer_id': 28192, 'author': 'JamesSugrue', 'author_id': 1075, 'author_profile': 'https://Stackoverflow.com/users/1075', 'pm_score': 0, 'selected': False, 'text': '<p>An <a href="http://blogs.vertigosoftware.com/teamsystem/archive/2006/06/23/Beware_the_Team_Test_VSMDI_file.aspx" rel="nofollow noreferrer">old post but</a> vsmdi is a meta data file created by the test system.</p>\n'}, {'answer_id': 28193, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 6, 'selected': True, 'text': '<p>It appears that the <a href="http://web.archive.org/web/20080302162715/http://blogs.vertigosoftware.com/teamsystem/archive/2006/06/23/Beware_the_Team_Test_VSMDI_file.aspx" rel="nofollow noreferrer">VSMDI problem is a known bug and has been around since VS2005 Team System</a> but it has no clear fix as yet. Another reason to NOT use MS Test.</p>\n\n<p>An MSDN blog details <a href="http://blogs.msdn.com/buckh/archive/2006/11/04/how-to-run-tests-without-test-metadata-files-and-test-lists-vsmdi-files.aspx" rel="nofollow noreferrer">how to run unit tests without VSMDI files</a>.</p>\n'}, {'answer_id': 7388367, 'author': 'Niklas', 'author_id': 15323, 'author_profile': 'https://Stackoverflow.com/users/15323', 'pm_score': 1, 'selected': False, 'text': '<p>I work around this by always checking out the .vsmdi.<br>\nIt seems that this only happens when the .vsmdi file is read-only, e.g. not checked-out in a version control system that uses that kind of lock-local-files behavior (Perforce etc).</p>\n'}, {'answer_id': 10734943, 'author': 'Hans Olsson', 'author_id': 306651, 'author_profile': 'https://Stackoverflow.com/users/306651', 'pm_score': 2, 'selected': False, 'text': '<p>Assuming that the VSMDI file is under source control, here\'s a Microsoft Support article about this issue: <a href="http://support.microsoft.com/kb/957358" rel="nofollow">Multiple vsmdi Files after Running Team Test with VSMDI file under Source Control</a></p>\n\n<p>Which says:</p>\n\n<p><em>Someone ran a test while someone else was modifying the vsmdi file. \nTeam Test detects that the VSMDI file is out of sync;therefore, Team\nTest it makes one and thus you see the incrementing vsmdi files.</em></p>\n\n<p>And:</p>\n\n<p><em>Going forward you want to make sure the file is not marked for auto\ncheckout when it is modified. When the current tester has the VSMDI\nfile checked out you, do not want other users to be able to check it\nout.  You want your developers to checkout the file, run a test, and\ncheck it back in.</em></p>\n'}]
['https://Stackoverflow.com/questions/28171', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1463/']