Options

How can I use .dll to Assembly?

undy0602undy0602 Member Posts: 67
Hello All,
I have to use .dll that is created by vendor company on NAV2016. I have only .dll file and dont have any source
I tried to create strong name for this .dll
C:\Program Files\Microsoft Dynamics NAV\90\RoleTailored Client\Add-ins>sn -k Name.snk
Key pair written to Name.snk

then want to create Public Token Key But it cannot and appears below message
C:\Program Files\Microsoft Dynamics NAV\90\RoleTailored Client\Add-ins>sn -T Name.dll
Name.dll does not represent a strongly named assembly

Whats going on here? How can I use this .dll by Assembly on NAV?

Regards,
Undy

Answers

  • Options
    EvREvR Member Posts: 178
    You can use it as an assembly to access it in code but if it's a control add-in the assembly needs to be signed. So if it's the last option you need the source and sign it.

    If it's just to use internal logic in code you don't need the public key and you don't have to register it in the control add-in table. Just add a variable of type 'dotnet' and look up the assembly in the server-tab.
  • Options
    undy0602undy0602 Member Posts: 67
    Can I use .dll by Automation Library? How can I do it?
  • Options
    EvREvR Member Posts: 178
  • Options
    undy0602undy0602 Member Posts: 67
    thanks EvR,
    My .dll file is located on
    - C:\Program Files\Microsoft Dynamics NAV\90\RoleTailored Client\Add-ins
    - C:\Program Files (x86)\Microsoft Dynamics NAV\90\Service\Add-ins
    But it cant show on my Assembly List. How it show?

    Regards,
    Undy
  • Options
    EvREvR Member Posts: 178
    I would try deleting it from the RTC (client) directory.
    Make sure it is in the Add-ins directory of the NAV service you connect to be default. Close all clients on your machine, restart the service (if all else fails) and then (if its a valid .net assembly) it should be in the list. And if you copied it from another machine, make sure the dll file itself is not locked/protected by windows (can't remember the exact term) by opening the file properties in your explorer, its on the main tab if it's locked)
  • Options
    undy0602undy0602 Member Posts: 67
    Thank you very much your kindly replies EvR,
    I have already created unmanaged .dll. It isn`t strongly name assembly. I tried to sign strong name below guide
    https://msdn.microsoft.com/en-us/library/xc31ft41(v=vs.110).aspx
    https://msdn.microsoft.com/en-us/library/6f05ezxy(v=vs.110).aspx

    But it appears again Name.dll does not represent strongly name assembly.
    Can I create strong name for this unmanaged assembly?

    Best Regards,
    Undy





Sign In or Register to comment.