Getting InvalidProgramException on MSTest using vstest.console.exe RRS feed

  • Question

  • I'm getting this weird InvalidProgramException when trying to call a static method from a static class that's in an external assembly.

    I've already tried bringing the routine within the same assembly, but the result is the same.

    Any ideas?

    -Pedro Luz

    Wednesday, January 6, 2016 3:31 PM


  • Hi PedroLuz89,

    Sorry for the delay responce.

    According to the error messag, it seems that the program you invoke is not recognized by MSTest. Please try run this test in Visual Studio directly, whether it can be run in Visual Studio?

    Then please add a test settings file to let your test Run tests in 64 bit process on 64 bit machine, which can let your test run compatible with your program and computer environment.

    In addition, please try comment the code in the TestHelper.Login() method one by one to check whether this problem caused by some code in that method.

    Best Regards,

    • Proposed as answer by Weiwei Cai Wednesday, January 27, 2016 7:05 AM
    • Marked as answer by Weiwei Cai Wednesday, January 27, 2016 7:06 AM
    Friday, January 22, 2016 2:38 AM