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

Bug reports.
kcochran
Posts: 9
Joined: Thu Sep 16, 2021 3:05 pm

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

Post by kcochran » Wed Jan 12, 2022 5:04 pm

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
image.png (190.42 KiB) Viewed 522 times
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
image (1).png (9.25 KiB) Viewed 522 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7422
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Thu Jan 13, 2022 12:17 pm

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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

kcochran
Posts: 9
Joined: Thu Sep 16, 2021 3:05 pm

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

Post by kcochran » Thu Jan 13, 2022 6:32 pm

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
image.png (11.5 KiB) Viewed 478 times


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

kcochran
Posts: 9
Joined: Thu Sep 16, 2021 3:05 pm

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

Post by kcochran » Thu Jan 13, 2022 10:18 pm

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7422
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Fri Jan 14, 2022 8:31 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

kcochran
Posts: 9
Joined: Thu Sep 16, 2021 3:05 pm

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

Post by kcochran » Fri Jan 14, 2022 5:37 pm

Yes, that fixed the issue. Thanks for your help!