How to report a bug with MT5?

 

I would like to know general process for reporting a bug with MT5.


I have created a dotnet6.0 C# DLL. MetaEditor can locate the DLL functions and code compiles ok, but MT5 is not finding the required functions inside the DLL.

Note this issue does not occur with very old version of C# DLLs.

How to report this to MT5 support?

Thanks

 
Here. Post code and information to reproduce your issue.
 
bot:

I would like to know general process for reporting a bug with MT5.


I have created a dotnet6.0 C# DLL. MetaEditor can locate the DLL functions and code compiles ok, but MT5 is not finding the required functions inside the DLL.

Note this issue does not occur with very old version of C# DLLs.

How to report this to MT5 support?

Thanks

Have you tried reinstalling C# since mt5 regulary updates self?

 
Oswald O #:

Have you tried reinstalling C# since mt5 regulary updates self?

Yes, it doesn't resolve the issue.

 
bot #:

***

Please insert the code correctly: when editing a message, press the button    Codeand paste your code into the pop-up window 
 

Step 1: Ensure you have dotnet 6.x installed. They are available from: https://dotnet.microsoft.com/en-us/download/dotnet/6.0

you can verify list of installed SDKs by running "dotnet --list-sdks"

Step 2: You will need the below 3 files.

Step 3: Copy the sample01.cs and sample01.csproj files into one folder named "sample01" and run "dotnet build" this should produce a .dll file under "bin\Debug\net6.0\" folder. rename the .dll to sample1.dll and copy to MT5's Library folder

Step 4: Copy the sample01.mq5 file to MT5's script folder and compile it.

Step 5: Try running it in MT5 and you will see errors like : "function 'Sample01.Class01::Add' not found in 'sample01.dll'"

Step 6: now modify the sample01.csproj to replace net6.0 to netstandard1.0 and run "dotnet build" this should produce a .dll file under "bin\Debug\netstandard1.0\" folder. rename the .dll to sample1.dll and copy to MT5's Library folder

Step 7: Recompile sample01.mq5

Step 8: Try running it in MT5 and you will it works with output like "Add() = 33"


Above demonstrates that MT5 supports very old version of C# DLL and not the newer versions. As MetaEditor is able to detect the functions in newer .Net why MT5 is not able to detect? It could be an easy fix for MetaTrader Dev team. Can you kindly look into this please?

Please let me know if you require further information.

Thanks

 


<!-- sample01.csproj -->
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net6.0</TargetFrameworks>
    <Platforms>x64</Platforms>
  </PropertyGroup>
</Project>

// file: sample01.cs
namespace Sample01 {
    public static class Class01 {
        public static int Add(int left, int right) { return left + right; }
    }
}

// file: sample01.mq5
#import "sample01.dll"
void OnStart() {
    Print("Add()= ",Sample01::Class01::Add(11,22));
}
 
Alain Verleyen #:
Here. Post code and information to reproduce your issue.

Thanks @Alain Verleyen for your reply. Are you part of the MT Dev team?

I have provided detailed steps to reproduce the issue including code snippets in the previous two messages. I look forward to your reply. Thanks

 
Target Net 4.8, newer is not supported.
 
amrali #:
Target Net 4.8, newer is not supported.

Is it documented somewhere? Current supported .Net seems to be about over 4 years old and the .Net has evolved a lot since. Now a days as most of the libs are produced in newer version of .Net Standard, when does the MT Dev team plans to add support for newer .Net DLLs?

 

@Alain Verleyen is it possible to add this to the list of bugs for the Dev team to look into please? Steps and sample code to reproduce it in my messages above.

Thanks

Reason: