Error in Open API 2.0 .Net Sample

Created at 15 Jun 2020, 18:25
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!
MZ

MZen

Joined 29.12.2014

Error in Open API 2.0 .Net Sample
15 Jun 2020, 18:25


There is no error when build is in Debug mode. However switching to Release mode gives an error, see below

Error    1    The type or namespace name 'ProtoOACtidTraderAccount' could not be found (are you missing a using directive or an assembly reference?)    X:\CTrader_Projects\Open-API-2.0-.Net-Sample-master\Open API 2.0 Sample\Main.cs    53    23    Open API 2.0 WinForms Sample

 

This is the latest distribution. Any idea what to do?

Thanks.

 


@MZen
Replies

PanagiotisCharalampous
16 Jun 2020, 08:21

Hi MZen,

I cound not reproduce such a problem. Do you have any specific steps to reproduce this?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

MZen
16 Jun 2020, 15:26

RE:

PanagiotisCharalampous said:

Hi MZen,

I cound not reproduce such a problem. Do you have any specific steps to reproduce this?

Best Regards,

Panagiotis 

Join us on Telegram

 

Sorry for false alarm. It works today.

Have no idea why. Did not change anything. Will watch it closely.


@MZen

MZen
16 Jun 2020, 17:02

RE:

PanagiotisCharalampous said:

Hi MZen,

I cound not reproduce such a problem. Do you have any specific steps to reproduce this?

Best Regards,

Panagiotis 

Join us on Telegram

 

I could get this error because I opened 'Open API 2.0 Sample' directory located inside of 'Open API 2.0 Sample' directory with different project file Open API 2.0 Sample.csproj instead of Open API 2.0 WinForms Sample.csproj  Actually Main.cs files in those directories have different length.

Could those projects interfere with each other while  opened  simultaneously or  otherwise? This could be the only cause I can think of.

For now I deleted second project Open API 2.0 Sample.csproj with its directory and WinForms Sample still works fine.

So, do we need second project and what is its purpose?


@MZen

PanagiotisCharalampous
17 Jun 2020, 08:39

Hi MZen,

No that project is not necessary. I removed it from there.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous