Ranorex Build Error

Ask general questions here.
costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Ranorex Build Error

Post by costamesakid » Tue Aug 30, 2011 8:38 pm

I keep getting the following build error. All my test steps are associated with an object. I can alleviate the error temporarily by restarting Ranorex. Any idea what the issue is? Thanks

Code: Select all

Failed to update code for 'C:\ranorex\TacViewLib\LinkSpecific\TrackManagement\Correlation\ValidateCorrelation.rxrec'. An unexpected error occurred while attempting to validate if code update is required. Failed to initialize user code. Cannot generate validation code because no repository item is linked to the validation record item. - C:\ranorex\TacViewLib\LinkSpecific\TrackManagement\Correlation\ValidateCorrelation.rxrec

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

Re: Ranorex Build Error

Post by Support Team » Wed Aug 31, 2011 11:01 am

Hi,

Please could you post us additional information:
  • Which version of Ranorex is in use?
  • Did you try to recompile the whole project?
  • Did you double click on the error message?
  • Is the element inside the repository or maybe it is gone?
Thanks in advance.

Regards,
Peter
Ranorex Team

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: Ranorex Build Error

Post by costamesakid » Thu Sep 22, 2011 9:13 pm

This is ridiculous

When recording, instead of Ranorex using a repo item I already have for reference it decides to create a new repo item with the same path. For instance, I have 'bntSave' well Ranorex will create 'btnSave1'.

To keep my repo clean I replace 'btnSave1' with 'btnSave' and delete 'btnSave1' from my repo. Then I build and get this error. I get 1 error for every time I do this and for each error I have to restart Ranorex. So if I do this 3 times, I have to restart Ranorex 3 times in a row??????????????? Each restart alleviates one of the error messages!!!!!!!!!

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

Re: Ranorex Build Error

Post by Support Team » Fri Sep 23, 2011 9:42 am

Hi,

Please could you tell me which version of Ranorex do you use, because it also depends on the version. We had a view issues with updating the code in Ranorex 3.0.x, but they should be fixed in Version 3.1.
Would it be possible to send or post us your Repository to check it?

BTW, it is enough when you type one sign of '?' , '!'. Inside a forum this means shouting.
We do our best to help you with your issues. Thank you for your understanding.

Regards,
Peter
Ranorex Team

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: Ranorex Build Error

Post by costamesakid » Tue Sep 27, 2011 9:08 pm

I am running 3.1

When I click on any one of the compile errors, a new 'Exception' dialog pops up with following information:

Code: Select all

Error Details: C:\TacView\TacViewLib\UISpecific\Help\TacViewC2_Help.rxrec

Ranorex.RanorexException: Failed to validate if code update is required. ---> Ranorex.RanorexException: Failed to initialize user code. ---> Ranorex.RanorexException: Cannot generate validation code because no repository item is linked to the validation record item.
   at Ranorex.Core.Recorder.RecordTableCodeGenerator.BuildValidationItemLines(ValidationRecordItem valItem, List`1 itemLines, Boolean addDelay)
   at Ranorex.Core.Recorder.RecordTableCodeGenerator.BuildItemLines(RecordItem item, List`1 itemLines, Boolean addDelay)
   at Ranorex.Core.Recorder.RecordTableCodeGenerator.BuildUserCodeItemLines(List`1 itemLines, Boolean addDelay, UserCodeRecordItem userCodeRecordItem, Boolean isinternalItem)
   at Ranorex.Core.Recorder.RecordTableCodeGenerator.tp_EnterContext(Object sender, TemplateContext e)
   at Ranorex.Core.TemplateParser.Apply(Object rootContext)
   at Ranorex.Core.Recorder.RecordTableCodeGenerator.GenerateInternal()
   at Ranorex.Sharpdevelop.RecorderCodeGenInfo.InitializeUserCode()
   --- End of inner exception stack trace ---
   at Ranorex.Sharpdevelop.RecorderCodeGenInfo.InitializeUserCode()
   at Ranorex.Sharpdevelop.RecorderCodeGenInfo.InitializeCode()
   at Ranorex.Sharpdevelop.CodeGenInfo.IsCodeUpdateRequired()
   at Ranorex.Sharpdevelop.CodeGenWorker.PrePreprocessCodeGenInfo()
   --- End of inner exception stack trace ---
The dialog allows me to send the error message to Ranorex which I have done a few times. Just strange that every time I close Ranorex and restart it 1 compile error goes away at a time.

Ill work on posting that repo. Thanks

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: Ranorex Build Error

Post by costamesakid » Thu Sep 29, 2011 6:52 am

Any idea what this error message is implying? Thanks

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

Re: Ranorex Build Error

Post by Support Team » Thu Sep 29, 2011 12:08 pm

Hi,

You have to delete the specific User Code items from your Recording view which uses the deleted repository item.
After you have deleted them you can add new User Code Actions to your Recording and select the methods from the deleted User Code items, because the method still exists in code.
This is because if you convert Actions to User Code we internally create some xml code and we address the specific repository item via the GUID, and if you replace the old repository item with a new one the GUID is a different one and therefore the exception is thrown.

Regards,
Markus
Ranorex Support Team

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: Ranorex Build Error

Post by costamesakid » Mon Oct 03, 2011 7:38 pm

Thank you. Your fix worked.