How to build .algo file with embedded resources?
How to build .algo file with embedded resources?
15 Mar 2019, 12:44
Hi all,
I am coding a cAlgo robot which uses a .Net library project which itself uses a python script located in the same folder as the library.
I use Git as version control solution. The .Net library is a submodule of my cAlgo robot Git repository.
So the file structure looks like this
cAlgo Robot solution |-- cAlgo Robot |-- .Net Library |-- pythonscript.py
If I test the submodule .Net Library all tests pass, the pythonscript.py can be executed. In the project settings the pythonscript.py is configured as 'Embedded Resource'. Copy to Ouput Directory is set to 'copy allways'
If I build the cAlgo robot solution an try to execute it the pythonscript.py is not found, throwing an exception.
Even if I add the pythonscript.py from the submodule as existing component to the solution of the cAlgo robot, set it to 'Embedded Resource' and 'copy allways', the script is not found.
If I look into the cAlgo robot /bin/debug folder during build for one instance the files from the build result show up for just a second, then disappear. However the pythonscript.py does not show up in the build folder.
How do I embed an Python script in my cAlgo solution, so that it builds on whichever cTrader platform I clone my repository?
THX!
Replies
Mikro
15 Mar 2019, 18:00
RE:
Hi Panagiotis,
unfortunately not since cTrader does not support .Net 4.5 Framework. There literailly is no Library for InfluxDb Interaction that does not at least require .Net 4.5.
So my only alternative is to either write the InfluxDB interface myselft in .Net 4 which is more than a p.... or calling a Python script which interacts with the database.
To do that I need to reference a script... and cTrader I now learn does not support using embedded resources during build ... I start to feel abandoned !
Is there any way you can think of to feed and retreive data from an InfluxDatabase from within cAlgo???
Best regards
Mikro
Panagiotis Charalampous said:
Hi Mikro,
This is not supported at the moment. Is it not possible to replace the python script with C# code?
Best Regards,
Panagiotis
@Mikro
PanagiotisCharalampous
15 Mar 2019, 14:58
Hi Mikro,
This is not supported at the moment. Is it not possible to replace the python script with C# code?
Best Regards,
Panagiotis
@PanagiotisCharalampous