Recent cTrader.Automate 1.0.6 NuGet update breaks multi project solutions.

Created at 27 Jan 2023, 12: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!
TA

taras.alenin

Joined 17.01.2023

Recent cTrader.Automate 1.0.6 NuGet update breaks multi project solutions.
27 Jan 2023, 12:46


Hey Team,

The latest 1.0.6 release of cTrader.Automate breaks multi-project solutions. It causes all the projects to use the same cAlgo name when building. Leading to a single cAlgo bundle deployed. The last project to build overwrites the bundle created by previous build.

. The issue is with the following MSBuild code. It uses the name of the folder that holds the solution rather than the individual projects :(

<_AlgoRootDirectoryName>$([System.IO.Path]::GetFileName($(_AlgoDirectoryPath))</_AlgoRootDirectoryName>
<_AlgoFileName>$(_AlgoRootDirectoryName).algo</_AlgoFileName>

A bit annoying.


@taras.alenin
Replies

Spotware
30 Jan 2023, 09:28

Dear trader,

This change was intentional. The name of the algo is taken from the folder in which the project is located. If you want to have several bots inside one solution, you need to place the cBot project in a separate folder and add the existing project to the solution.

Best Regards,

cTrader Team


@Spotware

taras.alenin
02 Feb 2023, 07:10 ( Updated at: 02 Feb 2023, 07:43 )

Thanks for your response. A follow up question. I currently have all my Indicators and Robot projects in their own directories. All sharing a common solution folder. What are you suggesting is the correct directory structure should be?

E.g. here the output of the build with 1.0.6. As you can see, the name is derived from the overall solution folder 'BigT' not the name of the directory of this particular indicator in this case 'BigT.FractalFarcture'.

1>BigT.FractalFracture -> C:\Users\Taras\source\repos\BigT\BigT.FractalFracture\bin\Debug\net6.0\BigT.FractalFracture.dll
1>BigT.FractalFracture -> C:\Users\Taras\source\repos\BigT\BigT.FractalFracture\bin\Debug\net6.0\BigT.algo
1>BigT.FractalFracture -> C:\Users\Taras\OneDrive\Documents\cAlgo\Sources\Indicators\BigT.algo

I appreciate you have reasons for the change. However, why take away the ability for the developer to control the name of the output *.algo file directly, explicitly. That way if one wants a solution structure in a way that makes sense to them, they can. I.e. can we please have the following option back.

<AlgoName Condition="'$(AlgoName)' == ''">$(MSBuildProjectName)</AlgoName>

Thanks,
Taras


@taras.alenin

josef.van.niekerk
28 Aug 2023, 22:39 ( Updated at: 30 Aug 2023, 07:03 )

RE: Recent cTrader.Automate 1.0.6 NuGet update breaks multi project solutions.

Hi @taras.alenin. Are you still able to have solutions with multiple projects as of cTrader.Automate version 1.0.8. I'm seeing my projects using my solution as the output name for the projects .algo filename.

Apologies to hijack your thread. I did also create a separate forum post.


@josef.van.niekerk