How to register .NET Component for use with Navision ?
Frekie
Member Posts: 19
Hi -
I have writen a .NET Component (actually a dll file) for use in Navision. I have tried to register it using regasm which correctly enters it in the registry. However ... I am not able to use it in Navision Attain (not even Attain 3.60). Any ideas ?
The error I get is that it is not properly registered. Indeed I can not find it anywhere in the custom controls.
Thanx
I have writen a .NET Component (actually a dll file) for use in Navision. I have tried to register it using regasm which correctly enters it in the registry. However ... I am not able to use it in Navision Attain (not even Attain 3.60). Any ideas ?
The error I get is that it is not properly registered. Indeed I can not find it anywhere in the custom controls.
Thanx
0
Comments
-
ok, here's my take on this, from what I remember from reading an introduction to .NET. I'm no wizard in this area by any means, mind you.
.NET stores the necessary files in a Global Assemply Cache, which is just a folder on your hard drive, instead of writing registry entries. Rather than looking in a list of thousands of entries, it only needs to get the right file (doing some type of checksum or something to uniquely identify the file) from that folder.
Also, the machine that you run your .NET program on must have the CLR installed, probably the whole .NET framework. You should be able to get this information on the MSDN website or in one of the public MS newsgroups.
HTH,
Daniel.0 -
Even 3.6 not being .net enabled, your dll would have to be a com object (OCX or Automation Server) in order to be used from within Navision.0
-
I am not sure about the .Net stuff but to reregistering a Custom Controls in Navision Financials or Attain you go to Tools Custom Controls. Then click the Control button at the bottom of the form and choose Browse.
Good Luck.There is a God!0 -
.NET and COM are two different enviroments ... :roll:
When making a .NET component you get an assembly, the metadata of this assembly has to be converted to the registry using the regasm.exe
All related assemblies shall be located in the Navision folder...
Regasm xxx.dll /tlb:xxxx.tlb0 -
Hello folks...

In order to see your methods and properties in Navision you'll have to add an attribute to your classes in .NET
C#
using System.Runtime.InteropServices;
.
.
.
[ClassInterface(ClassInterfaceType.AutoDual)]
public class MyClass
{
implementation
}0 -
Hi,
there are two ways to enable automation server call from Navision :
1. Simple way
Copy your dll to the same folder as your navision program file (where the fin.exe or finsql.exe). Then use regasm to register the dll incl. the tlb file.
2. Hardest way
Create a strong name (use sn.exe), and then add the sn-file to your code. Compile it, and register it using gacutil.exe0 -
I have been struggeling with the same thing for a while and I have found a solution (maybe it isn't the most correct one, but it worked).
I have added a Setup Project to my Solution and in this project I created all the necessary 'Primary Ouput' files.
For the 'Primary Output' files that would create the DLL files I have set the 'Register' property to "vsdrpCOM".
This property has taken care of the registration process for me, so after installation the dll was available from inside Navsion (not only in C/AL Code but also at Run time).
If you do not set this property the dll was available in C/AL Code (as automation variable) but not at run time. (I always got an error that said that an Instance of this automation server could not be created).
Hope this helps.
GreetingsNow, let's see what we can see.
...
Everybody on-line.
...
Looking good!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 329 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
