views:

334

answers:

4

Visual Studio seems to be modifying a list of .vsmdi files in my .sln every time sometimes when I run a unit test. This is annoying because my source control client thinks the .sln file needs to be checked in even though I don't want to check it in. Is there any way to keep Visual Studio from munging the .sln file after a test run?

Edit: Found a Microsoft Connect issue discussing this, which sucks because things just sort of disappear from there after a little while and its a terrible bug tracker

A: 

Edit: Oops, was confused about the "list of vsmdi files" thing. Suggestion wouldn't have worked.

Peter
Yeah I kinda need to keep .sln files in source control
Luke
A: 

I dont have an answer, i'd love to get one.

Peter Marshall
A: 

That is a question for the ages...I always check if the solution has been checked out for whatever reason before I commit changes.

Mike Brown
+3  A: 

I don't believe a solution exists. A good Connect case, that does a better job of documenting the issue and a repro case, is this one. At the very bottom of the page a commenter proposes a workaround, which I've reproduced here. I haven't actually tested this workaround for myself yet, I guess I've gotten numb to discarding the changes caused by this bug :(

From the connect case:

I have been able to repro this problem by having developer A run tests with the vsdmi file while developer B check it out and adds unit tests to the vsdmi. This typically will cause a new one to be generated.

The workaround that has worked for me is to create vsdmi files per dev for unit testing activities that are not checked in to SCC and create special vsdmis for build testing and automated regression.

Yuck, but it works.

Seth Petry-Johnson
Not sure I understand the workaround. Can anybody clarify this?
Luke
Luke: I'm not sure I understand it either, I just copied it from a Connect case that seems to contain a good writeup :) No one on my team besides me runs the tests with any frequency, so it hasn't been worth my time to test any workarounds... I'm so used to this bug I hardly notice it anymore :)
Seth Petry-Johnson