views:

7291

answers:

5

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.

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

A: 

An old post but vsmdi is a meta data file created by the test system.

KiwiBastard
+10  A: 

It appears that the VSMDI problem is a known bug and has been around since VS2005 Team System but it has no clear fix as yet. Another reason to NOT use MS Test.

An MSDN blog details how to run unit tests without VSMDI files.

Jon Limjap
the first link was unaccessible at the time I clicked it, but you can read it archived thanks to The Wayback Machine: http://web.archive.org/web/20080302162715/http://blogs.vertigosoftware.com/teamsystem/archive/2006/06/23/Beware_the_Team_Test_VSMDI_file.aspx
akavel
Thanks for the wayback link. :)
Jon Limjap
@ Jon Limjap: you wrote "Another reason to NOT use MSTest".I'm curious: what are your other reasons to NOT use MSTest?Also, what unit testing framework(s) do you prefer?BTW: strange, I get a .vsmdi error but the tests seem to run regardless which is way too weird for my preference.regards ~~ gerry (lowry) [email protected]
gerryLowry
gerry, You do have to take note that this is a very old answer. At that time, MSTEst was a relative novelty in the test driven development scene. It was to be avoided because it was difficult to use: a proxy class had to be generated between the actual object to facilitate test capability. This is very much unlike NUnit and NUnit based tools (MbUnit, xUnit, etc) which were quite mature as open source unit testing frameworks at that time. My preference then and up until now is MbUnit.
Jon Limjap
Jon, thank you for explaining. Have you looked at xUnit.net? Jim Newkirk (NUnit 2 author) and Brad Wilson created xUnit.net [http://xunit.codeplex.com/]. Daniel Cazzulino (Moq author) uses xUnit.net for testing Moq. Why is MbUnit your preference?
gerryLowry
gerry, My preference isn't really a preference but more of a comfort zone thing -- we've been using it for a long running project, with Rhino mocks as our mocking framework. One of these days I might give xUnit and Moq a try, and maybe it could change my mind. Let's see. :)
Jon Limjap
A: 

A problem which persists in the VS2010 Beta2. It's looking more and more like I'll be going back to NUnit or MBUnit in the near future.

TonyMo
+2  A: 

Here is the list of problems I've experienced with VSMDI files along with tips how to fix them: http://dobrzanski.net/2010/07/10/visual-studio-common-problems-with-vsmdi-files/

Jaroslaw Dobrzanski