Error CT0002 Assembly must contain algo type

Created at 21 Feb 2023, 16:40
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!
bishbashbosh's avatar

bishbashbosh

Joined 08.08.2018

Error CT0002 Assembly must contain algo type
21 Feb 2023, 16:40


I am in the process of upgrading my codebase to `net6.0`

I have created some nuget packages containing utility code that I use across many indicators and robots. Under .net framework v4.x I simply referenced  cAlgo.API.dll.

However now when I reference cTrader.Automate nuget package under .net 6, these projects fail to build, giving the error above.

It would be a great help if you would separate out the API interface types into a separate package that can be referenced by any project.


@bishbashbosh
Replies

bishbashbosh
21 Feb 2023, 17:03

solved

as you were - just found another forum post with the same problem from last year 

Never mind, figured out there's a property that can be set which bypasses the build.

Add the below snippet to your library .csproj file:

<PropertyGroup>
  <AlgoBuild>False</AlgoBuild>
</PropertyGroup>

Hope that helps someone else.


@bishbashbosh

protraderde
25 Feb 2024, 11:13

RE: solved

bishbashbosh said: 

as you were - just found another forum post with the same problem from last year 

Never mind, figured out there's a property that can be set which bypasses the build.

Add the below snippet to your library .csproj file:

<PropertyGroup>  <AlgoBuild>False</AlgoBuild></PropertyGroup>

Hope that helps someone else.

 

Helped me, Thanks! ❤️


@protraderde