Add file as resource

Best practices, code snippets for common functionality, examples, and guidelines.
PR91
Posts: 8
Joined: Fri Aug 10, 2018 8:33 am

Add file as resource

Post by PR91 » Wed Feb 06, 2019 9:39 am

Hi,
I have to execute sql file from ranorex.
I want to put it in a Ranorex as a resource (after building, file should be in Debug folder).
Problem is that I don't know how to add file to Ranorex as a resource (like in Visual Studio).
Using 'Add item...' causes error 'Compiling single files is not supported, please create a project!'.

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

Re: Add file as resource

Post by odklizec » Wed Feb 06, 2019 10:10 am

Hi,

All you have to do is to put the file(s) anywhere in your project directory, e.g. using windows explorer and then set the file to copy to output dir...
AddFilesToProject.png
The only problem is, that you must repeat the process (steps 2-4) for every single added file, which is quite annoying. There is already a feature request to improve the workflow by implementing multiselection. Please vote for it here:
https://uservoice.ranorex.com/forums/15 ... rojects-vi
You do not have the required permissions to view the files attached to this post.
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

PR91
Posts: 8
Joined: Fri Aug 10, 2018 8:33 am

Re: Add file as resource

Post by PR91 » Wed Feb 06, 2019 4:42 pm

Thank you ! :)