Register dll on Client Machines

eYe
Member Posts: 169
Created a dll and registered successfully with regasm runs 100% on my local machine.
Copy dll to customer's test server, register (regasm xl83.dll /tlb), I can compile my codeunit that uses the automation, I can see my functions when I design the codeunit, but during runtime on
IF ISCLEAR(ExcelSheetFormat) THEN
CREATE(ExcelSheetFormat);
I suspect that it needs installed in the GAC, but server (and user machines) doesn't have gacutil...
Tried writing a custom application that does the following
It doesn't give any errors, but doesn't seem to do anything either.
Copy dll to customer's test server, register (regasm xl83.dll /tlb), I can compile my codeunit that uses the automation, I can see my functions when I design the codeunit, but during runtime on
IF ISCLEAR(ExcelSheetFormat) THEN
CREATE(ExcelSheetFormat);
This message is for C/AL programmers:
Could not create an instance of the OLE control or Automation server identified by
GUID={904B2CAB-EA6B-4171-8177-994AFE7A144A} 1.0:{C058A8CF-2369-3D95-B94A-F7B03F87B2D6}:'xl83'.xl83.
Check that the OLE control or Automation server is correctly installed and registered.
I suspect that it needs installed in the GAC, but server (and user machines) doesn't have gacutil...
Tried writing a custom application that does the following
FileInfo customClass = new FileInfo(args[0]); new System.EnterpriseServices.Internal.Publish().GacInstall(customClass.FullName);
It doesn't give any errors, but doesn't seem to do anything either.
Kind Regards,
Ewald Venter
Ewald Venter
0
Answers
-
http://stackoverflow.com/questions/372140/c-sharp-com-dll-do-i-use-regasm-or-regsvr32
set regasm="C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
set regasm64="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"
%regasm% xl83.dll /register /codebase /tlb
%regasm64% xl83.dll /register /codebase /tlbKind Regards,
Ewald Venter0 -
Hi
Would'nt regsrv32.exe do the job?
My opinion:
If you design a dll used as an automation object, you use regsrv32.exe and while designing in visual studio you have to provide a proper com interface. If you design a .NET assembly and want to use it in RTC as .NET Variable, you don't have to register it at all. It just has to be located in the Add-ins directory of the middle tier and of the classic client of you want to compile. At least for 2009 R2 this should be true.
Regards
Thomas0 -
Hi,
I did write an interface for my class but regsvr32 didnt work.
Followed all the guidelines in writing a COM visible class for NAV but most posts end with registering the class with gacutil which is not always possible.
This is for a NAV5.1 installation, quite spoilt with 2009R2 and 2013's interoperability also
RegardsKind Regards,
Ewald Venter0 -
Additional info to my first post:
I have built a DLL for NAV 5.0, using good old VB6, without using regasm on the target clients, instead used regsrv32.exe. In VB6 I had to comment each function with the DispId() property.
Hope this helps.
Thomas0 -
Does dependencies on other libraries in your's make a difference?
I am using Microsoft.Office.Interop.Excel amongst others.
Will keep it in mind and give it a try though, thanks!Kind Regards,
Ewald Venter0 -
My dll had dependencies on a 3rd party dll, but it's quite some time ago...0
-
I also experienced this dll hell, and the thing that helped me, was targeting the V4.0 framework rather than v2.0.50727, though the .NET project was targeted to v3.5
in command prompt do the following:
uninstall Your previous version with regasm /u xxx.dll
then:
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 (or whatever the actual v4 build number is)
and
regasm "C:\Install\NAVcomToDoSmth.dll" /TLB:"C:\Install\NAVcomToDoSmth.tlb" /codebase
The dll worked without even adding it to the GAC.
Hope this helps to anyone.0
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