Dear Community,
i got a question about
using .Net DLL's in Navision Classic Client.
I wrote a
test dll for testing how to implement da dll file into navision,
that it is able to use as automation variable.
Picture of my C# class (developed in .net 4.5.2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I added my dll with regasm and into the gac with following commands:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" "C:\Users\Jean-Pierre.Schmidt\Documents\Visual Studio 2015\Projects\DemoDLLA\DemoDLLA\bin\Release\DemoDLL.dll" /tlb:"C:\Users\Jean-Pierre.Schmidt\Documents\Visual Studio 2015\Projects\DemoDLLA\DemoDLLA\bin\Release\my.tlb"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe" /i "C:\Users\Jean-Pierre.Schmidt\Documents\Visual Studio 2015\Projects\DemoDLLA\DemoDLLA\bin\Release\DemoDLL.dll"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here you can see how it looks like, when i selected my DLL.
#Edit: Strong Name is given to file via key file created from visual studio commandline.
I hope you can help me and give me some advices what I've did wrong.
Kind Regards,
Strew
Answers
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
Any other suggestions?
C:\Program Files (x86)\Microsoft Dynamics NAV\**\RoleTailored Client\Add-ins
Where ** is your version no of dynamics nav. Like in case of 2013R2 it is 71 etc.
By adding this, you will be able to see the dll in navision.
Once the DLL is available there you can go in NAV make a new Datatype of DotNet and there you will find your DLL with all Methods you have declared in C#.
Let me know if you have any other question.
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.
i've already tried this, but i read that this feature using addin folder ist
for RT Client. I'm not a specialist, if I'm wrong please correct me.
Here is the file:
Finding my DLL and Class is working fine, but using it throws this error:
Translated Error: The .NET-Interoptyp can not be used for the code in the classic CSide-Runtime.
Look here, this guy has the same version & same problem with AddIn Folder:
http://forum.mibuso.com/discussion/51054/the-net-interop-type-cannot-be-used-in-code-for-the-classic
please refer to this German article on how to create proper Interface and stuff for using .NET DLL as Automation. An Automation created this was can also be used in newer versions as DotNet type.
msdynamics.de/viewtopic.php?f=14&t=2423
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
My Failure was that i didn't checked the checkbox -> "Com-DLL visible" and the display ID over the function