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
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.
Best Regards,
Roll
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.
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
Hi Will,
Oh... i got your point, let me try it first, thanks
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
But now, system seems only check the library blong to "System core level" folder.
@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 ~_~
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++.
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.
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
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.
But you can try to use Assembly class to load the assemblies that you want, see the blog:
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,888 Super User 2024 Season 2
Martin Dráb 229,247 Most Valuable Professional
nmaenpaa 101,156