Why axapta tells that .dll metod is private even if it is public?

I am using C# .dll in references. In that is public method I need. When I try to use it in axapta than the axapta tell the method is declared private. How this can happen?

Details, please. Can you show us the method and the call in AX? What’s the exact error message?

In Axapta:

MailWrapperLib.MailLib mailLib;

mailLib = new MailWrapperLib.MailLib();


In C#:

namespace BSMailLibrary

{ public class BSMailLib {

public string Dispatch(string s) …

It is compiled to MailWrapperLib.dll

The error message is “The method is declared private and may only be called from the methods in class CLRObject.”

The error seems to be about CLRObject.dispatch(), not BSMailLib.Dispatch(). It fails before even trying to call your method.

(I can’t currently do any experiments with it; maybe later.)

I renamed the metod now. Reinstall .dll in gacutil. Reload the reference and AX do not see the public method in dll so it looks like you are right.