VS2017 - cannot create new cBots with cTrader 4.2.17 with referenced indicators

Created at 03 Aug 2022, 05:46
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FI

firemyst

Joined 26.03.2019

VS2017 - cannot create new cBots with cTrader 4.2.17 with referenced indicators
03 Aug 2022, 05:46


Hi everyone:

We have been trying to create new cBots in cTrader 4.2.17 using Visual Studio 2017. The steps on this page do not work at all for us: https://help.ctrader.com/ctrader-automate/visual-studio-ides/

So I create the new cBot under Automate, select the framework, and want to include a managed reference to another indicator as shown:

Then I click "Edit in Visual Studio".

This is what comes up. First, notice all the yellow triangles in the Solution explorer; second, there's no errors indicated by Visual Studio even though quite clearly I've put in variables as parameters that clearly do not exist:

 

When I try and install the cTrader.Automate package as per the documentation, this is what happens:

 

The indicator itself has the package installed:

 

The bot has the target framework set at 4.8:

The .NET 6.0 cannot be installed because on the Microsoft page it says it's compatible with versions of Visual Studio 2022 or later; we are stuck with 2017 for the time being.

https://dotnet.microsoft.com/en-us/download/visual-studio-sdks

Even dot net core requires VS version 2019 or later.

So what is happening that we cannot reference custom legacy indicators when creating new cBots and have our bots build properly now in Visual Studio 2017? Note that "legacy" bots still work and compile as expected.

@PanagiotisCharalampous? @amusleh?

Thank you.

 


@firemyst
Replies

PanagiotisCharalampous
03 Aug 2022, 10:50

Hi firemyst,

We will check this. Thanks for reporting.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

firemyst
09 Aug 2022, 09:33

RE:

PanagiotisCharalampous said:

Hi firemyst,

We will check this. Thanks for reporting.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Just wanted to touch base and see if there's any progress or if any more details are needed?

Thank you.


@firemyst

mage
09 Aug 2022, 09:49

RE: RE:

firemyst said:

PanagiotisCharalampous said:

Hi firemyst,

We will check this. Thanks for reporting.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Just wanted to touch base and see if there's any progress or if any more details are needed?

Thank you.

From Solution explorer, right click on your solution and add existing project, select project of your indicator. This should fix your issue.


@mage

PanagiotisCharalampous
09 Aug 2022, 10:20

Hi firemyst,

It will be fixed in a future update, it's a low priority issue at the moment. The fastest workaround is to use a newer VS version.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

firemyst
21 Aug 2022, 15:13 ( Updated at: 21 Dec 2023, 09:22 )

RE: RE: RE:

mage said:

 

From Solution explorer, right click on your solution and add existing project, select project of your indicator. This should fix your issue.

It doesn't. I still try and build the solution and it fails, but gives no errors or warnings as to why:


@firemyst

firemyst
21 Aug 2022, 16:12 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi firemyst,

It will be fixed in a future update, it's a low priority issue at the moment. The fastest workaround is to use a newer VS version.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

This isn't as straight forward either @Panagiotis.

I created a new bot in cTrader version 4.2.20; I added Indicator references that were created in earlier versions of VS and cAlgo, and were all built in "release" mode under the .Net framework 4.8;

Then I clicked to edit in Visual Studio. The newly created bot puts all the reference paths to the "Debug" folder with no way to change it:

The bot won't compile as a result; I can't find a way to change the "Path" to the "Release" folder in VS 2022.

What I had to do is remove all the "Project" references and then add all the "Release" dll assembly references.

Why is this the default behavior - to add the path to a debug dll that doesn't exist instead of adding the assembly reference to a "release" mode dll that DOES exist?


@firemyst