MSBUILD : error MSB1009: Project file does not exist.

Best practices, code snippets for common functionality, examples, and guidelines.
ziasim
Posts: 43
Joined: Wed Dec 16, 2015 4:03 pm

MSBUILD : error MSB1009: Project file does not exist.

Post by ziasim » Thu May 03, 2018 3:10 pm

Hi,

I am trying to learn Ranorex integration with Jenkins. Initially, my setup was

- Jenkins and Ranorex are running on same machine.
- No SCM is configured to use in Jenkins.
- Using sample project 'KeyPassTestSuite' to learn integration things.
- Jenkins master is not running as service .

It worked well and I was able to build and run KeyPassTestSuite project using Jenkins job. In this configuration, I was using absolute paths in "Build" configuration area in created job for MSBuild and for running Ranorex test suite.

Then

I added jenkins slave machine to run ranorex scripts on this machine. Now the setup is like

- Jenkins master(Server 2012R2) and Ranorex are running on same machine.
- Jenkins slave is running on different machine (Win7) with Ranorex main components and ranorex runtime license are installed
- No SCM is configured to use in Jenkins.
- Using sample project 'KeyPassTestSuite' to learn integration things.
- Both jenkins master and slave are not running as service.

When I try to execute ranorex scripts on slave machine, it throw me an error in console output

MSBUILD : error MSB1009: Project file does not exist.

While googtling, It was found that I need to use relative paths instead of absolute path in Build configuration of created job. I changed absolute paths to relative paths for MSBuild and Ranorex test suite files but the results were same with same error.

I then tried to run same job having relative paths in Build configuration on master machine and it didn't work there either :shock: So in summary

- If paths in build configuration are absolute then it is working OK on jenkins master machine but not on jenkins slave machine.
- If paths in build configuration are relative then its not working on master nor on slave machine.

I am using Ranorex 8.0 atm.

Any help in this regard will be appreciated.

Thanks,
Attachments
ranorex 2.jpg
ranorex 2.jpg (210.82 KiB) Viewed 966 times
ranorex 1.jpg
ranorex 1.jpg (84.14 KiB) Viewed 967 times

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

Re: MSBUILD : error MSB1009: Project file does not exist.

Post by odklizec » Fri May 04, 2018 8:40 am

Hi,

If there is no SCM configured in your Jenkins job, how do you transfer solution to Jenkins slave? Simply put, the absolute path will most probably not work on slave machine, because it's probably different? Or you are logged with different account, which has no access to "Administrator" folder?

In my opinion, you should use SCM plugin, to get the solution files and store them within the job workspace, so then you can simply call it by using %WORKSPACE% env. variable, e.g. like this:
%WORKSPACE%\tfs\SolutionName.sln
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

ziasim
Posts: 43
Joined: Wed Dec 16, 2015 4:03 pm

Re: MSBUILD : error MSB1009: Project file does not exist.

Post by ziasim » Thu May 10, 2018 2:03 pm

@odklizec, thank you very much. After configuring SCM for this job, I was able to run scripts on slave machine using relative paths