Show stopping cTrader compilation error

Created at 25 Oct 2024, 01:04
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!
KE

kenneyyfx

Joined 12.02.2022

Show stopping cTrader compilation error
25 Oct 2024, 01:04


LATEST UPDATE: This issue has now been found to be within Microsofts purview.  A fresh cbot project with a few lines of code gave the same error when compiled in Visual studio, but compiled without error using the cTrader desktop compiler. Anyone experiencing this same issue should now be aware its to do with the latest windows 10 updates & NOT cTrader related.

 

Severity Code Description Project File Line Suppression State
Error (active) CT0001 Could not find file 'C:\Users\kenne\Documents\cAlgo\Sources\Robots\KFX_PRD_m1m5_vd\KFX_PRD_m1m5_vd\bin\Debug\net6.0\KFX_PRD_m1m5_vd.algo.metadata'. KFX_PRD_m1m5_vd C:\Users\kenne\.nuget\packages\ctrader.automate\1.0.9\build\cTrader.Automate.targets 62 
 

cTrader.Automate version 1.0.9  - this runs in cTrader desktop 4.9.1 from I.C Markets and also cTrader desktop 5.0.40 from Spotware - I get this build error in visual studio 2022

I have uninstalled and reinstalled the apps and also visual studio all to no avail.

My code is bug free and was working fine up until Tuesday evening. On Wednesday the code wont build on two separate projects (post MS windows10 updates) and produces the same error. 

Both cbots have dependencies on custom indicators (which have no errors and have been working fine)

It is my understanding that with each build/rebuild the project.algo.metadata file should be deleted and then recreated. The deletion occurs but not the recreation and thats where the problem lies. Could this non recreation of the metadata file be due to a permissions issue?

I am now hesitant to compile any other project knowing this error will bear its ugly head.

Please, PLEASE!! help


@kenneyyfx
Replies

firemyst
27 Oct 2024, 08:51

Go scorched earth:

  1. copy your c# source code into a separate Notepad text file and save it separately.
  2. copy any other source code file affected in the solution into separate files for backup purposes
  3. delete everything from the folder, including the name of the bot/indicator itself
  4. Go into cTrader and create the new indicator/bot again from scratch
  5. open in Visual Studio
  6. Compile as is to make sure it works
  7. add any references you need to
  8. now open the file in visual studio
  9. copy and paste the source code from the backup Notepad file you created in step #1 into the .cs file
  10. try compiling again to see if it works

That should hopefully fix up or wipe out any “corruption” or otherwise bad metadata in the project you had initially created.

See if that works?


@firemyst