(CT0002) Assembly must contain algo type

Created at 11 Dec 2023, 14:30
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!
LA

larocca.mario12

Joined 11.12.2023

(CT0002) Assembly must contain algo type
11 Dec 2023, 14:30


Hi,

I'm trying to create a Cbot with Visual Studio Code. I would like to interface my bot with telegram and I installed TLSharp library. The code doesn't give me any problem but when I run it. It gives me this error:

Assembly must contain algo type. [C:\Users\laroc\Documents\cAlgo\Sources\Robots\TeleForex\TeleForex\TeleForex.csproj] (CT0002)

The error is in the file cTrader.Automate.targets in this line:

        <ExtractMetadataTask AssemblyPath="$(TargetPath)"

I don't know what's the problem. Can someone help me? Thank you so much!!


@larocca.mario12
Replies

PanagiotisCharalampous
12 Dec 2023, 06:37

Hi there,

This message comes up when your project references cTrader Automate API  but does not include an Algo class.

Best regards,

Panagiotis


@PanagiotisCharalampous

larocca.mario12
12 Dec 2023, 20:57 ( Updated at: 13 Dec 2023, 06:21 )

RE: (CT0002) Assembly must contain algo type

PanagiotisCharalampous said: 

Hi there,

This message comes up when your project references cTrader Automate API  but does not include an Algo class.

Best regards,

Panagiotis

Thank you, I'm new in this world. What does that mean? Thank you!! :)


@larocca.mario12

PanagiotisCharalampous
13 Dec 2023, 06:38

RE: RE: (CT0002) Assembly must contain algo type

larocca.mario12 said: 

PanagiotisCharalampous said: 

Hi there,

This message comes up when your project references cTrader Automate API  but does not include an Algo class.

Best regards,

Panagiotis

Thank you, I'm new in this world. What does that mean? Thank you!! :)

Hi there,

I am not sure how to explain it in a simpler way :) If you want to use cTrader Automate API, your C# project needs to contain an Algo class.

Best regards,

Panagiotis


@PanagiotisCharalampous