Options

How to use custom .net library in Business Central (onPrem) ?

cuge89cuge89 Member Posts: 2
edited 2019-11-28 in NAV Tips & Tricks
Hi all, i'm trying to figure out how i can make my own library (or any other third party library) work in AL - Business Central, if anyone can help would be much appreciated.
What i have been doing so far:
  • Business Central is on premise, no cloud needed
  • app.json has "target": "Internal"
  • edited user settings in VScode as suggested on some blogs:
    bb0sr78gzt6f.jpg
  • this where i'm including dotnet types in a random codeunit:
    q1bcjnypm7ut.jpg
    (First 2 libraries works, the problems come with last one)
  • If i try to build i get this error:
    cvexq2y3mtg0.jpg

Answers

  • Options
    ShaiHuludShaiHulud Member Posts: 228
    Did you actually put "PdfSharp.dll" into "c:\Program Files\Microsoft Dynamics 365 Business Central\140\Service\Add-ins\" folder? Also, try restarting NAV service and Visual Studio
  • Options
    cuge89cuge89 Member Posts: 2
    Yeh my PdfSharp.dll was there in that folder, and i knew i had to restart the service but i probably did some mess and maybe i restarted it in some precedent attempt and forgot to restart it when the dll was in the correct folder.
    Ty anyway for helping me to realize this, i was almost there 😅
Sign In or Register to comment.