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:
  • this where i'm including dotnet types in a random codeunit:
    (First 2 libraries works, the problems come with last one)
  • If i try to build i get this error:


  • ShaiHuludShaiHulud Member Posts: 138
    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
    Arturas Kulsinskas

    All opinions expressed are my own and are not reflective of my employer
  • 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.