TFS agent build not executing on VM

Ask general questions here.
bdhobbs
Posts: 2
Joined: Thu Nov 17, 2022 4:50 pm

TFS agent build not executing on VM

Post by bdhobbs » Wed Jan 25, 2023 12:54 am

Hello,

I have been having some issues with my TFS Agent not building the same as on my local computer.

We have a different pipeline than what was proffered in the documentation. After build, we publish the build artifacts (rather than test results), then download them to a VM that we install our software on and then execute the tests.

If I build on my local machine and copy it out to the VM, everything works. (i.e. the license and runtime are there, along with all the necessary prerequisites). Yet, when I build it on the server and publish it to the VM and try to execute, I get the same stack trace as this other post: problem-with-building-and-executing-ran ... 20502.html, which didn't seem to get resolved.

Any ideas? I didn't see any build flags mentioned in the documentation, and don't see anything complicated when building it locally.

Just a shot in the dark to see if someone may know.

Cheers,
Bryan

bdhobbs
Posts: 2
Joined: Thu Nov 17, 2022 4:50 pm

Re: TFS agent build not executing on VM

Post by bdhobbs » Mon Jan 30, 2023 9:10 pm

So, got this answer from my QA team through their support contact. I am posting this here for posterity, as this worked for me.

When building a Ranorex Solution in Visual Studio, you need additional calls which you have to add. A detailed description can be found on our website: https://www.ranorex.com/help/latest/int ... tegration/
I have seen this error message before and for other customers adding the two lines into the Program.cs file right before calling the TestSuiteRunner helped.
Ranorex.Core.Resolver.AssemblyLoader.Initialize();
TestingBootstrapper.SetupCore();