Page 1 of 1

Test execution crash. Exception is thrown by the target of the invocation.

Posted: Wed Jan 12, 2022 5:04 pm
by kcochran
Edition Windows 10 Pro
Version 20H2
Installed on ‎9/‎14/‎2021
OS build 19042.1415
Serial number PF363ZJ2
Experience Windows Feature Experience Pack 120.2212.3920.0
Ranorex Verison: 10.1.5

So all the individual test scripts work fine. However, when I run the whole test suite, I get this message.
image.png
It looks like it failed to start the code in the.CS file. The dependencies are installed
namely .net and VC++ redistributables, I even uninstalled and reinstalled. I also uninstalled Ranorex and reinstalled it. The individual test script in questions works fine when run by itself as do all the other test scripts that are combined into the Test Suite.
I excluded the test script that seems to cause the error from the project, but the same error appears.

The code line in question is in the image below. I am using the CMD (Admin) to generate the file.

image (1).png

Re: Test execution crash. Exception is thrown by the target of the invocation.

Posted: Thu Jan 13, 2022 12:17 pm
by odklizec
Hi,

As far as I know, Ranorex 10.x requires .Net 4.8. so this might be an incorrect error message? So I would suggest to install .Net 4.8 as well as .Net 4.8 SDK (developer pack).

Re: Test execution crash. Exception is thrown by the target of the invocation.

Posted: Thu Jan 13, 2022 6:32 pm
by kcochran
Thanks for your reply. I installed the .net 4.8 as suggested and now I get this when I run the test suite.
image.png


E:\ is the USB partition I am creating a file using the CMD.

Re: Test execution crash. Exception is thrown by the target of the invocation.

Posted: Thu Jan 13, 2022 10:18 pm
by kcochran
This has been resolved.

The E:\ was a secure USB that was not mounting. Deleted the recording module and remade it using a different method. I can now run the complete Test Suite successfully.

Re: Test execution crash. Exception is thrown by the target of the invocation.

Posted: Fri Jan 14, 2022 8:31 am
by odklizec
Hi,

So the original problem was caused by improper .Net version and installing 4.8 fixed it? Have you installed both runtime and developer pack? Thanks.

Re: Test execution crash. Exception is thrown by the target of the invocation.

Posted: Fri Jan 14, 2022 5:37 pm
by kcochran
Yes, that fixed the issue. Thanks for your help!