ReportToPDF compile error

Best practices, code snippets for common functionality, examples, and guidelines.
dominik_F
Posts: 15
Joined: Thu May 09, 2019 10:03 am

ReportToPDF compile error

Post by dominik_F » Fri May 31, 2019 9:30 am

Dear community,

I tried creating PDF reports for my TestSuites.
Therefore I added "Ranorex Automation Helpers" to my solution and added those to at the end of the teardown.
PDF creation basically worked, but all files were overwritten by the last one (as described by someone else in
https://www.ranorex.com/forum/viewtopic ... pdf#p53012 )

There I read to update the nuget packages which I did.
I now have the Automation Helper in Version 1.5.3 (may 8th 2019) and the ReportToPDF v1.0.16 (May 3rd)
Since the update, the solution won't compile anymore as a reference is missing and the namespace "Ranorex.PDF" is unknown (intelliSense proposes to use it, but when building, it tries to access a exe, that doesnt exist ->
The reference refers to " ...\RanorexAutomationHelpers\bin\Debug\Ranorex.ReportToPDF.exe". This file does not exist though or cannot be build due to the missing reference.

The error is in "ReportToPDFModule.cs Line 156
I have not manipulated the file and let it use the default parameters for paths and names.

EDIT: the error message is (in german): Dieser Verweis konnte nicht aufgelöst werden. Die Ranorex.ReportToPDF, Version=1.0.14.0, Culture=neutral, PublicKeyToken=null-Assembly wurde nicht gefunden. Stellen Sie sicher, dass die Assembly auf dem Datenträger vorhanden ist. (MSB3245)


br dominik

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: ReportToPDF compile error

Post by Support Team » Mon Jun 03, 2019 7:48 pm

Hi dominik_F,

I suspect there is some old reference still in the solution which needs to be removed. This is a difficult one to troubleshoot without actually seeing the solution. Are you able to provided a compressed copy of it? If you wish to troubleshoot this in a more private manner, please create a support ticket and we will be happy to more closely analyze your solution and find what is broken.

Looking forward to your reply!

Regards,
Ned

Dhundley
Posts: 8
Joined: Fri Nov 06, 2020 12:23 am

Re: ReportToPDF compile error

Post by Dhundley » Fri Mar 12, 2021 3:51 pm

i'm getting essentially the same error:

2021-03-11T22:50:08.9625141Z ##[error]RanorexAutomationHelpers\Modules\ReportToPDFModule.cs(154,12): Error CS0234: The type or namespace name 'PDF' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?). I 've attached an image showing line 154 of the ReportToPDFModule.

The solution works for me when I run it on my own personal workstation and it works when I send it from my workstation over to a VM using the ranorex remote agent. It is failing in the build step of the pipeline agent job using MSBuild after I have checked in everything from my local repository up to the master repo in Azure and there is nothing left to commit/checkin (see second attachment called Commit). It is attempting to perform the build on the same VM that I do when I employ the remote agent from my workstation.

I'm relatively new to Ranorex. What am I missing here?
Attachments
Commit.png
Commit.png (45.13 KiB) Viewed 605 times
ReportToPDF_Line154.png
ReportToPDF_Line154.png (25.78 KiB) Viewed 605 times

Dhundley
Posts: 8
Joined: Fri Nov 06, 2020 12:23 am

Re: ReportToPDF compile error

Post by Dhundley » Fri Mar 12, 2021 4:42 pm

Thought it might be helpful if I also attached a view of what the repo looks like in Azure. as you can see, the Ranorex Automation Helpers is part of the repo which includes the ReportToPDFModule. So why does my build have the message " The type or namespace name 'PDF' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?)". it seems to be actually referring just to the PDF node part of Ranorex.PDF.Creator.CreatePDF in line 154. What's up with that?
Attachments
Files in Azure Repo.png
Files in Azure Repo.png (130.51 KiB) Viewed 603 times

raygoel
Posts: 5
Joined: Tue Sep 15, 2020 3:38 pm

Re: ReportToPDF compile error

Post by raygoel » Mon Apr 05, 2021 7:39 pm

I am facing the same issue. I have updated the reference but Azure still fails to build the solution.
Can anyone help with this please?