Could not load file or assembly Ranorex.Core

Ask general questions here.
HansSchl
Posts: 143
Joined: Wed Sep 19, 2018 10:05 am

Could not load file or assembly Ranorex.Core

Post by HansSchl » Mon Mar 25, 2024 12:24 pm

Hi,

when I'm trying to run a test in Rx Studio, the test fails within moments, and the log shows this error message: "Could not load file or assembly 'Ranorex.Core, Version=10.5.4.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' or one of its dependencies. The system cannot find the file specified. "

This is a virtual computer running Win 11 Enterprise 21H2 with all recommended updates. Rx Studio is version 11.1.2. The solution (*.rxsln) was created under an older version of Rx Studio; I believe that was version 10.5. The test runs well under Rx Agent (fails at a later stage, but that is another story). No older Ranorex software was ever installed to this machine, nor any Visual Studio or any C++ runtime or .NET framework except for what the Windows 11 setup installs.

When for the first time I tried to open the solution with Rx Studio 11.1.2, I received an error message about Ranorex not being able to find the Microsoft.Build assembly. I was able to fix this problem by installing Visual Studio 2019 ".NET desktop build tools". Now it is possible to load and compile the solution in Rx Studio.

I turned the "Local copy" setting for the Ranorex.Core assembly on, and the poject's bin\debug folder now contains a file named Ranorex.Core.dll version 11.1.2.0. Is it maybe necessary to "upgrade" the solution for the latest Rx Studio (similar to what you can do with Visual C++ solutions in Visual Studio)? If so, how is it done?

Thank you for your help
Hans

HansSchl
Posts: 143
Joined: Wed Sep 19, 2018 10:05 am

[solved] Could not load file or assembly Ranorex.Core

Post by HansSchl » Tue Mar 26, 2024 8:36 am

I figured it out. Please don't laugh...
I had completely forgotten about my huge user code library. Of course I must recompile it under the latest Ranorex version. Now I can run the test in Rx Studio.