vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
521 stars 281 forks source link

MTApi EA execution error #153

Closed kinson516 closed 5 years ago

kinson516 commented 5 years ago

When I start the EA, it report errors "can not load file MTApiService, version=10.30.0, ...... System can not find the file or dependency not found" Then I take a look at it. I found the MTApiService is not in the MT3/libraries folder, I copy it to there. IT still report errors. Then I copied it to windows/system32. I tried to Regasm MTApiservice.exe. It report errors saying "Generic code can not be exported to COM" In addtion, I tried to Regsvr32 MTApiservice.exe. What is the problem? Did I miss something? Thanks

kinson516 commented 5 years ago

add the detail error information, the suspicious is the "PublicKeyToken=null"

2019.04.23 17:05:14.693 MtApi XAUUSD,H1: [ERROR] SendMtEvent: 未能加载文件或程序集“MTApiService, Version=1.0.30.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。

kinson516 commented 5 years ago

Finally I solved the issue. The problem is the local compiled MTApiservce version is 1.0.30.0 which does not in the GAC (I got the installer from offical site which version is 1.0.28.0. I change the reference of MTApiService in project MTconnector and recompile the connector. Then it is working fine.