Build errors after migrating to Ranorex 6.2.1

Ask general questions here.
saminathan
Posts: 8
Joined: Tue Mar 10, 2015 9:56 am

Build errors after migrating to Ranorex 6.2.1

Post by saminathan » Mon Jun 05, 2017 9:58 am

Hi,

OS Version – Win 7, 64 bit
Ranorex – 6.2.1
Technology – C#, WCF, WPF

We have upgraded our automation solution from 5.2.4 to 6.2.1 and i am getting below build errors due to framework change.

Property or indexer 'Ranorex.Core.Reporting.ReportEnvironment.CustomFilesDirectory' cannot be assigned to -- it is read only (CS0200)
The property or indexer 'Ranorex.Core.Reporting.Activity.MergeId' cannot be used in this context because the get accessor is inaccessible (CS0271)
'Ranorex.Core.Reporting.Activity.MergeId' is inaccessible due to its protection level (CS0122)

Could you please let us know the workaround for above issues in 6.2.1.

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Build errors after migrating to Ranorex 6.2.1

Post by jma » Tue Jun 06, 2017 1:24 pm

Hi,

please explain your use case and what exactly you want to implement. There were some API changes in the latest versions of Ranorex, but I couldn't find the corresponding methods in that list.
API changes: https://www.ranorex.com/release-notes/api-changes.html

Probably, the forum community can help you if you explain in detail what you want to implement.

saminathan
Posts: 8
Joined: Tue Mar 10, 2015 9:56 am

Re: Build errors after migrating to Ranorex 6.2.1

Post by saminathan » Fri Jun 09, 2017 10:36 am

Hi,

Earlier in 5.4.2 we used to set custom file folder to other folder path like mentioned below.
TestReport.ReportEnvironment.CustomFilesDirectory = miFormalReportFolderPath;

But in 6.2.1, same line is giving the below error
Property or indexer 'Ranorex.Core.Reporting.ReportEnvironment.CustomFilesDirectory' cannot be assigned to -- it is read only (CS0200)

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Build errors after migrating to Ranorex 6.2.1

Post by jma » Mon Jun 12, 2017 2:14 pm

Hi,

I would suggest disabling the report in the test suite properties (uncheck the option "Enable Report"). After that, you could run the following line of code in the setup region of the test suite in order to set up the report. This will enable you to set the custom report file location during runtime.

Code: Select all

Ranorex.Core.Reporting.TestReport.Setup(ReportLevel.Info, "<filename>", true, true, 30, "<custom report file location>");
More information about this method can be found in the API documentation: https://www.ranorex.com/Documentation/R ... etup_2.htm