Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Using a custom version...
Finance forum
Suggested answer

Using a custom version of a DLL

Posted on by 5
Hi Community,
 
I'm writing a custom DLL that requires DocumentFormat.OpenXml.dll v 3.1.0.0,
So I added both in my bin folder and added 2 references in AOT
 
First, I notice my reference OVERRIDES (rather than extend) the standard reference to DocumentFormat.OpenXml in a lower version.
Is that a good idea? What happens when MS updates their version?
Is there another way to load a newer version of a DLL already used in the system?
Is there anychance the new assembly may not work 100% where D365 expects the old version, and therefore this might break another standard feature without being aware?
 
It's not uncommon even in standard code for DLL overrides, there are plenty of them:
Microsoft.Dynamics.ApplicationPlatform.Environment is in both application platform and application foundation
 
When I call the new DLL from X++ code, I get the following errors:
Could not load file or assembly 'DocumentFormat.OpenXml, Version=3.1.0.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: 
 
Last, do I need to sign my assembly? the new openxml assembly? 
 
Thanks
 
VS
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 228,366 Most Valuable Professional on at
    DLL
    It's not possible, as far as I know. F&O will use its version, not yours. Until Microsoft updates the version in F&O, a workaround for you is doing the job outside F&O, e.g. in an Azure function.

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,462 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,366 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans