How to clear [Ignore] cache for testing methods? (without restarting Visual Studio)

I have some tests that were marked as [Ignore] , but now I want to run them again, so I remove the [Ignore] attribute, but Visual Studio still considers them to be ignored.

What can I do to clear the cache so that I no longer ignore the tests?

Update:

It looks like this data is stored in the vsmdi file:

 <TestLink ... name="MethodName" ... enabled="false" /> 

Thus, it is necessary to delete the vsdmi file or otherwise cause its recovery.

But visual studio caches it, so restarting visual studio seems to fix the problem (sometimes at least).

+4
source share
4 answers

Have you tried Clean Solution (in the build menu)? Also I would try to delete the bin / obj folders from the test project. If this does not work, I would look for other (binary) files that may be a cache of some type or associated with test projects and simply delete them. I can’t imagine that it’s hard to find such files and just delete them (make sure you have a backup, just in case).

EDIT Apparently, this is a .vsmdi file.
EDIT2 Seen not : P

If I encountered such a problem, I would even make a search file looking for specific method names that were [ignored]. Make sure you use a tool that looks “inside” of each file; the Windows file search ignores the krapton files.

+2
source

We have this problem in which I work too.

You can manually modify the .vsmdi file or delete it. If you open the test view again (after deleting it), it will create a new file.

In addition, the same problem may occur with which test settings you have selected. It will also "cache".

+2
source

Even if this topic is quite old, I would like to add a solution to this problem for those who have the same problem ...

I had a problem too and found a solution in the .vsmdi file. In the section " Test Settings ", " Unit Test " there was a folder specified in the "Root folder for downloadable assemblies:" and the checkbox "Use download context" for assemblies in the test directory ".

I unchecked the box and after that my tests were successful! (I knew the files mentioned in the "Root folder ..." where the old assemblies are. You can also delete files from the "Root folder ..." folder to delete the old assemblies.

+1
source

I used Visual Studio 2012 and did not have a .vsdmi file, but ran into a problem. I was able to solve this problem by deleting the .suo file (the hidden file next to the .sln file) and restarting Visual Studio. I know this says without a restart, but the solution provided did not work for me, so I provide an alternative if someone else encounters the same error.

0
source

All Articles