.Net DLL as a automation variable - No class shown in selection

Strew
Member Posts: 4
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
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
0
Best Answer
-
Hi Strew,
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=2423Cheers
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.5
Answers
-
Use .net 2 or 3.5 to register the dll instead of 4.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/0 -
With .Net 3.5 and 2.0 it isn't working, too.
Any other suggestions?0 -
You simply need to post the dll in this folder:
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.Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.0 -
Dear zohaibu95,
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
0 -
Hi Strew,
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=2423Cheers
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.5 -
Thaaaaaanks. It works like a charm.
My Failure was that i didn't checked the checkbox -> "Com-DLL visible" and the display ID over the function0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions