Hi,
http://msdn.microsoft.com/en-us/library/gg502473.aspx but I can't figure out what's the problem.
I have registered my dll into the GAC and created a variable in NAV as mentioned in the link above.
Name: test, DataType:DotNet, Subtype: MyDll, version ..........
My dll contains a single class with a static method which his called like that :
test.StaticMethod();
Then when opening the page containing this modification boum :
This message is for C/AL programmers: Unable to create an instance of .NET object: assembly MyDll ....
I have no idea why NAV try to create an instance, it should not. If I uninstall the dll from the GAC the same message appears. I tried to put the dll in the Add-ins folder but still the same result.
Any help will be appreciated
Comments
In your linked example the .NET variable named 'xml' is instanced by constructor: The .NET variable named 'items' is "instanced" by result value:
You are right. However as mentioned above, I'm using a static method. -> No need to instantiate an object.
I finally succeed to load my dll. I have no clue why. I have clean my system and put the dll in the Add-ins folder of NAV. Hocus Pocus !
Thanks for the help anyway.
And any addin .dll is required to be in the addin folder before NAV can instanciate it.
|To-Increase|
from MS: So installing it in the GAC is enough right?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Having installed my dll in the server's GAC, I kept getting this message also.
It went away when I restarted the navision service on the server