Solution: "Test Case Extractor crashes after Test Plan selection" with error: Microsoft.TeamFoundation.TestManagement.Client.dll System.NullReferenceException

Oct 25, 2016 at 6:56 PM
Hey there!

I found simple solution how to fix crash after Test Plan selection. I have succefully tested it on my win 10, and win 2008 -r2.

NOTE
This solution may help you only if you have something like this:
An unhandled exception of type 'System.NullReferenceException' occurred in Microsoft.TeamFoundation.TestManagement.Client.dll
Additional information: Object reference not set to an instance of an object.

Steps to fix:
  • In test case extrator's folder create .config file with name "Test_Case_Extractor.exe.config"
    It should look like this.
    Image
  • Open Test_Case_Extractor.exe.config with notepad and copy this code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true"> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
    </startup>
</configuration>
  • Click Save
  • Run Test Case Extractor
  • Extract !
PS. I want to thank mzboray for the solution. Found it here: LINK

PPS This line is not necessary.
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> 
The main magic is in useLegacyV2RuntimeActivationPolicy attribute. LINK

Hope it helps you too. Good luck !