web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Could not load file or assembly 'PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken or one of its dependencies. The system cannot find the file specified.

(0) ShareShare
ReportReport
Posted on by 365

We have used custom .dll file  PDFSharp in our code to combine the pdf files. This is working fine in D365 FOE version PU31 (10.07). But after upgrading it to PU 36 (10.0.12) the code is looking for some other version .dll file and giving below error.

We have added the file as reference and it shows the version 1.0.0.0

Could not load file or assembly 'PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken or one of its dependencies. The system cannot find the file specified.

We have checked in the bin folder as well and the file do exists.

What could be the issue?

I have the same question (0)
  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    When you are getting this error during build ?

    Can you try deleting  the file from source control and re add it. Make sure to add xml  for reference  from the below path

    K or C:\AOSService\PackagesLocalDirectory\[package name]\[model/project]\AxReference  and dll from bin folder

  • kartikkp7 Profile Picture
    365 on at

    Hi Sukrut,

    The error is occurring while executing the code and not during the build.

    This is cloud vm so we have not configured the source control as we are deploying through package.

    Below is the xml for reference that you asked.

    <?xml version="1.0" encoding="utf-8"?>

    <AxReference xmlns:i="www.w3.org/.../XMLSchema-instance">

    <Name>PdfSharp</Name>

    <AssemblyName>PdfSharp</AssemblyName>

    <AssemblyDisplayName>PdfSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyDisplayName>

    <Version>1.0.0.0</Version>

    </AxReference>

  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    Which version did you use previously ? is same as error message Version 1.50.5147.0 ?,

    if it is older version it might have compatibility issues.

    as per the site latest stable version is  www.nuget.org/.../1.50.5147 , jsut try  to install / replace with newer version.

    Hope this helps ,

    Amith Prasanna

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Kartik,

    Looks like PdfSharp was added to the standard application and you don't need to use reference anymore. Try to remove reference and check again. At least in my PU36 devbox i can use PdfSharp directly without references.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Just a suggestion on the side note , You should start using source control. Wether it's a cloud hosted VM or downloaded one you shouldn't be deploying packages created directly  from VM. Instead you should deploy a build VM and start using packages generated by build VM. Below docs is your starting point.

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/perf-test/continuous-build-test-automation

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Sort of off topic but you should immediately start using source control before you lose your code. It's happened to many others before you and it's only a matter of time before you have some issue / corruption with your VM and the code is gone.

    Remember that the deployable package doesn't contain source code so you can't restore your code from the packages if your dev VM breaks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans