Ranorex Jenkin Itegration Nuget package missing

Ranorex Studio, Spy, Recorder, and Driver.
amitgupta
Posts: 54
Joined: Sun Mar 28, 2021 7:58 pm

Ranorex Jenkin Itegration Nuget package missing

Post by amitgupta » Mon Sep 20, 2021 9:12 pm

Dear Team,

When i try to integrate Ranorex Tool With jenkins. I am getting below attached console output error after running build .I have given proper git repository path in jenkins build setting.

Could any team help me on this Please?

Error 1 :- C:\Jslave-mertest01\workspace\SampleAutomationProject\WebAutomation\WebAutomation\WebAutomation.csproj(2403,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\NuGet.VisualStudio.5.10.0\build\NuGet.VisualStudio.targets.

Error 2 :- C:\Jslave-mertest01\workspace\SampleAutomationProject\WebAutomation\RanorexAutomationHelpers\Modules\ReportToPDFModule.cs(154,4): error CS0234: The type or namespace name 'PDF' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) [C:\Jslave-mertest01\workspace\SampleAutomationProject\WebAutomation\RanorexAutomationHelpers\Ranorex Automation Helpers.csproj]

Error 3:- C:\Jslave-mertest01\workspace\RanorexAutomationJobCommandPrompt\ranorex-WebTest-plugin\ranorex-AutomationToolHelper-plugin\ranorex-AutomationToolHelper-Modules\ReportToPDFModule.cs(154,4): error CS0234: The type or namespace name 'PDF' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) [C:\Jslave-mertest01\workspace\RanorexAutomationJobCommandPrompt\ranorex-WebTest-plugin\ranorex-AutomationToolHelper-plugin\ranorex-AutomationToolHelper-plugin.csproj]

Image
Thanks
Amit
Last edited by amitgupta on Wed Sep 22, 2021 9:09 pm, edited 1 time in total.

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

Re: Ranorex Jenkin Itegration Nuget package missing

Post by odklizec » Tue Sep 21, 2021 8:10 am

Hi,

In my opinion, the problem is not in missing nuget package, but missing RanorexAutomationHelpers project in GIT. Please make sure that RanorexAutomationHelpers files are checked in GIT (along with your test project).
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

MichielV
Posts: 17
Joined: Fri Sep 07, 2018 8:12 am

Re: Ranorex Jenkin Itegration Nuget package missing

Post by MichielV » Tue Nov 09, 2021 11:10 am

You can add restore and update commands for the nuget packages to your jenkins pipeline before building like this:

//update nuget packages
bat label: 'restore nuget packages', script:"c:\\nugetCLI\\nuget.exe restore .\\[yourScriptFolder]\\[yourSolutionFolder]\\[yourSolutionName].sln"
bat label: 'update nuget packages', script:"c:\\nugetCLI\\nuget.exe update .\\[yourScriptFolder]\\[yourSolutionFolder]\\[yourSolutionName] -safe -FileConflictAction overwrite -noninteractive"

//build
bat label: 'build test', script:"\"${tool 'MSBuild'}\" .\\[yourScriptFolder]\\[yourSolutionFolder]\\[yourSolutionName].sln ${buildConfig}"