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

Is there anyone success upgrade closedxml 0.94.2 to D365 finance and operations?

(0) ShareShare
ReportReport
Posted on by 315

Good day,

We are now using a very old version of closedxml in d365 f&o, we want to use some new function of this library which exist in the latest version

I get the DLL from NuGet, and get all the dependency library with right version

.NETFramework, Version=v4.6

DocumentFormat.OpenXml (>= 2.7.2)

ExcelNumberFormat (>= 1.0.3)

FastMember (>= 1.3.0)

I got to the DLL and put them into the Bin folder of my solution, full build the solution, also restart the iis express...

But when i execute the excel function with ClosedXML, below error show:

Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I had been try different version of 'DocumentFormat.OpenXml', same error with all version i  was tried...

Is there someone success upgrade ClosedXML to latest version? please help, thanks in advance!

Best Regards,

Roll

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi Roll,

    This DLL is belong to the Application Platform package.

    So if you add other version of this DLL, this may cause some problems.

    pastedimage1586242614962v1.png

    But you can try to use Assembly class to load the assemblies that you want, see the blog:

    https://community.dynamics.com/ax/b/ftdynamicsax/posts/dynamics-ax-2012-use-openxml-sdk-for-excel-export-part-3

    Hope this helps.

  • AX Lover Profile Picture
    315 on at

    Hi Will,

    Thanks your reply, the blog you mentioned is a C# way solution, but we integrate ClosedXML methods to X++ way

    As you said, the DocumentFormat.OpenXml belong to the Application Platform package, seems we can only wait MS to upgrade.

    @D365 finance and operations team, can you get me some comment on this? Thanks.

    Best Regards,

    Roll

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You might consider creating an Idea about it, so that Microsoft might pick it up. Or you can also join the Insider program, and get access to R&D Feedback Yammer group where you can discuss with the product team.

    Both can be accessed via this site:

    https://experience.dynamics.com/

    Microsoft indeed has some quite old 3rd party libraries as part of the product. The problem is that they need to care about backwards compatibility, also in cases where partners and customers are using these third party libraries in their solutions. So if they change the libraries, existing customizations and extensions might break.

  • WillWU Profile Picture
    22,361 on at

    Hi Roll,

    Yes , you can create the "CurrentDomain_AssemblyResolve"(by the blog) method in your C# project, then  go to your X++ project and add a reference(your class).

    At last, you can call the  "CurrentDomain_AssemblyResolve" method from X++.

  • AX Lover Profile Picture
    315 on at

    Hi Nikolaos,

    Thanks your reply, yes, i understand the reason of keep old version of this library, but i think the good way is check the same name library under the Bin folder of customization solution first.

    Just like below, i put all the dependencies library under my solutions Bin folder

    ClosedXML.png

    But now, system seems only check the library blong to "System core level" folder.

    ClosedXML2.png

    @Nikolaos , i know you are the star person of AX world, and you maybe a member of that groups, can you do me a favor to ask the product team to have a look my post?  Thanks ~_~

  • AX Lover Profile Picture
    315 on at

    Hi Will,

    Oh... i got your point, let me try it first, thanks

  • AX Lover Profile Picture
    315 on at

    Hi Will,

    I tested but still same error, i tried below two different way to load the library. Any sugguestion? Thanks.

    Assembly.Load("DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17");

    Assembly.LoadFrom("DocumentFormat.OpenXml.dll");

    Best Regards,

    Roll

  • WillWU Profile Picture
    22,361 on at

    Hi partner,

    Not very sure, this issue may be in a dependency.

    I think you should make sure that all the libraries needed by the DLL have been installed.

  • AX Lover Profile Picture
    315 on at

    Hi Will,

    I got all the library from NuGet, and put all of them into the Bin folder of my solution, it should be ok, NuGet manager auto download all of the dependencies, and i also check the version one by one.

    41616.png

    Best Regards,

    Roll

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 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans