Trouble registering Microsoft.Navision.Mail.dll in version 4

deltoiddeltoid Member Posts: 41
We wanted to use SMTP in version 4.02 and rather than use a 3rd party dll I decided to use the one from Navision 5.0. In my testing environment this works fine and I can register, compile and run the codeunit.

In the client's environment they can't. They run the .reg script and it says it is successfully registered, they then close Navision and open it again, when they open it and try and run the test it complains, when trying to compile the codeunit it will also complain. It is as though the .dll is not registered.

To register the DLL I use the following .reg script
REGEDIT4

[HKEY_CLASSES_ROOT\Microsoft.Navision.Mail.SmtpMessage]
@="Microsoft.Navision.Mail.SmtpMessage"

[HKEY_CLASSES_ROOT\Microsoft.Navision.Mail.SmtpMessage\CLSID]
@="{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}"

[HKEY_CLASSES_ROOT\CLSID\{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}]
@="Microsoft.Navision.Mail.SmtpMessage"

[HKEY_CLASSES_ROOT\CLSID\{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="Microsoft.Navision.Mail.SmtpMessage"
"Assembly"="Microsoft.Navision.Mail, Version=1.0.2615.23507, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}\InprocServer32\1.0.2615.23507]
"Class"="Microsoft.Navision.Mail.SmtpMessage"
"Assembly"="Microsoft.Navision.Mail, Version=1.0.2615.23507, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}\ProgId]
@="Microsoft.Navision.Mail.SmtpMessage"

[HKEY_CLASSES_ROOT\CLSID\{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
[/code]

Comments

  • kinekine Member Posts: 12,562
    Have you copied .DLL and .TLB file or just DLL?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • deltoiddeltoid Member Posts: 41
    I can't say 100% what the client has done but my instructions were:

    1. Close Navision.
    2. Copy the .tlb and .dll to the Client folder of Navision.
    3. Run Mail.reg.
    4. Open Navision.

    The only thing I can think of at the moment is that they haven't followed the instructions correctly as every computer I test it on, works.
  • ayhan06ayhan06 Member Posts: 210
    hi,
    i came up with that problem like you before..after trying to register and being not able to register it, i have written my own codeunit that uses CDO... it works, but i had spended lots of time to register that dll.. now i wonder how you generated this .reg file or you found it somewhere?.. if you found somewhere, where did you find it?
  • deltoiddeltoid Member Posts: 41
    ayhan06 wrote:
    now i wonder how you generated this .reg file or you found it somewhere?.. if you found somewhere, where did you find it?

    I created the .reg file myself. Only I don't remember how I did it. I think I used the regasm.exe tool that comes with the .NET Framework.
  • deltoiddeltoid Member Posts: 41
    ayhan06 wrote:
    now i wonder how you generated this .reg file or you found it somewhere?.. if you found somewhere, where did you find it?

    Hi ayhan06, in my investigations today I realised how I created the .reg file again. I used the Microsoft.NET framework too regasm.exe. You can find it in the following location:

    %systemroot%\Microsoft.NET\Framework\[dotnetversion]\regasm.exe if you run the /? switch on it it will list the available options.

    I think the command would be something like:

    regasm "C:\Program Files\Navision\Client\Microsoft.Navision.Mail.DLL" \regfile:"c:\mail.reg"

    This should generate the mail.reg file which can be run and will register the dll (make sure the dll is in the same directory as the Mail.DLL and make sure the .tlb is also in the same directory as the DLL.
  • ayhan06ayhan06 Member Posts: 210
    deltoid wrote:
    ayhan06 wrote:
    now i wonder how you generated this .reg file or you found it somewhere?.. if you found somewhere, where did you find it?

    Hi ayhan06, in my investigations today I realised how I created the .reg file again. I used the Microsoft.NET framework too regasm.exe. You can find it in the following location:

    %systemroot%\Microsoft.NET\Framework\[dotnetversion]\regasm.exe if you run the /? switch on it it will list the available options.

    I think the command would be something like:

    regasm "C:\Program Files\Navision\Client\Microsoft.Navision.Mail.DLL" \regfile:"c:\mail.reg"

    This should generate the mail.reg file which can be run and will register the dll (make sure the dll is in the same directory as the Mail.DLL and make sure the .tlb is also in the same directory as the DLL.


    thanks deltoid.. i ll try it.
  • Johnny_ReggaeJohnny_Reggae Member Posts: 63
    Hi Deltoid,

    what was eventually the solution to your problem ?
  • ChowdaryChowdary Member Posts: 148
    deltoid wrote:
    3. Run Mail.reg.

    Hi

    How to run this?
    Pleasure in the job puts perfection in the work
  • ChowdaryChowdary Member Posts: 148
    edited 2012-05-07
    ayhan06 wrote:
    deltoid wrote:
    ayhan06 wrote:

    I think the command would be something like:

    regasm "C:\Program Files\Navision\Client\Microsoft.Navision.Mail.DLL" \regfile:"c:\mail.reg"

    This should generate the mail.reg file which can be run and will register the dll (make sure the dll is in the same directory as the Mail.DLL and make sure the .tlb is also in the same directory as the DLL.

    thanks deltoid.. i ll try it.

    Hi ayhan

    did you succeed with this command?
    I have both files:
    Microsoft.Navision.Mail.DLL and Microsoft.Navision.Mail.tlb in this path
    C:\Program Files\Microsoft Dynamics NAV\60\Classic

    but what is mail.reg, help me out plz
    Pleasure in the job puts perfection in the work
  • ChowdaryChowdary Member Posts: 148
    edited 2012-05-07
    ohh ok \:D/

    I got it =D>

    now the problem is :
    file format error, plz see the attachment

    please help out here
    Pleasure in the job puts perfection in the work
  • ChowdaryChowdary Member Posts: 148
    Chowdary wrote:
    ohh ok \:D/

    I got it =D>

    now the problem is :
    file format error, plz see the attachment

    please help out here

    thanks
    Chowdary

    I missed space after microsoft.navision.mail.dll"/

    correction microsoft.navision.mail.dll" \
    Pleasure in the job puts perfection in the work
Sign In or Register to comment.