Vanguard Coder

Simple Life of a Keen Developer

Visual Studios Unit Test MsTests OutOfMemoryException

leave a comment

With time in some code bases containing a mixture of old code over a decade may end up with a lot of files and thousands of unit tests. The project may not have been refactored and a lot of technical debt has built up. Visual Studio may start of complain and give Out Of Memory Exception and not run your unit tests. A quick fix is to add a registry entry as pointed out here.

Add the following entry: HKLM\Software\Microsoft\VisualStudio\9.0\EnterpriseTools\QualityTools\EnableCMI = 0 (DWORD)

This will turn off auto discovery of unit tests, so compiling after changing unit test names or added new tests will be required.

Not a perfect fix, but something to keep you going for longer when you don’t have any other option.

 

 

Written by zkashan

July 1st, 2012 at 6:53 am

Posted in Uncategorized

Leave a Reply