Solved

After upgrade to 23 R1 some DLLs not getting published, Can't load PX.DATA

  • 20 September 2023
  • 4 replies
  • 271 views

Userlevel 2
Badge

Hi,

We just got a new 23 R1 sandbox to test so we can migrate to that but some of the customizations not getting published and throwing different errors:

 

Customizations were built on ERP 2021 R1 and now moved to 2023 R1

 

Errors are like

AcuAddonsBase.dll Failed to resolve type reference: PX.Objects.GL.GLTran/reclassifiedWithTranDate declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null


AcuAddonsCommon.dll Failed to resolve type reference: PX.Data.PXMacroManager declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e


AcuAddonsCommon.dll Failed to resolve method reference: PX.Data.PXMacroManager PX.Data.PXMacroManager::get_Default() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e


AcuAddonsCommon.dll Failed to resolve method reference: System.Object PX.Data.PXMacroManager::TryResolveExt(System.Object,PX.Data.PXCache,System.String,System.Object) declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e


AcuAddonsCommon.dll Method signature was changed: System.Void PX.Data.DependencyInjection.LifetimeScopeHelper::BeginLifetimeScope() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e


FTP.dll Failed to resolve type reference: PX.BusinessProcess.Event.MatchedRow declared in PX.BusinessProcess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e

 

FTP.dll Failed to resolve method reference: System.Collections.Generic.Dictionary`2<PX.PushNotifications.KeyWithAlias,System.Object> PX.BusinessProcess.Event.MatchedRow::get_NewRow() declared in PX.BusinessProcess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
 

I also tried to open the dlls to see the code but they giving me error while opening like:

Cannot open the DLL file: Could not load file or assembly 'PX.Data, Version=1.0.0.0,

 

Any help will be highly appreciated!!

icon

Best answer by PorchlightZach 20 October 2023, 18:09

View original

4 replies

Userlevel 6
Badge +4

I have a similar issue when I upgrade versions.  When a customization includes custom code, there often are code updates required to accommodate changes on the Acumatica side and then recompiled.  I usually have some change on most major versions, although once in a while the changes may be minor.  Still, I must recompile my code because signatures of methods may have changed or been moved entirely to other classes.  Going from 21 to 22 was notable, but then 22 to 23 was even more challenging for us due to workflow engine changes and the addition of costcenterid to a lot of attributes related to inventory.

When you open your customization project in Visual Studio, look at the references to see if any of them show an error.

If they do not look like above, note the reference and then remove it and re-add it from the BIN folder of your site.

In my case, my bin folder does not contain any of your listed DLL’s throwing the errors, but they appear to be making calls within standard Acumatica DLL’s.  If your project does not “see” the other DLL’s in References, it would explain your issue.

Userlevel 2
Badge

Thanks Brian for the solution but in my case I don’t have project files of the customization (unfortunately we lost the consultant) we have just dll files we can see in the customization packages, any idea how can we upgrade the dlls to make them compatible for new version? your help is highly appreciated!!

Userlevel 6
Badge +4

Not knowing your specific situation, I would say you are stuck.  You need your customization project updated.  Without access to the source code, the only 2 options I know are to stay in 21r1 which is about to be unsupported or recreate your customization.  There are ways to decompile your DLL which could recover a large portion of the work for you, but there would be no comments, no context, etc.  Someone would have to untangle raw code to fix any issues with recompiling.

It’s possible others in the community may have other thoughts, but you should try to get the source code if you paid someone to write it for you.

Userlevel 3
Badge

Thanks Brian for the solution but in my case I don’t have project files of the customization (unfortunately we lost the consultant) we have just dll files we can see in the customization packages, any idea how can we upgrade the dlls to make them compatible for new version? your help is highly appreciated!!

 

I have a pretty technical suggestion, but if you’re comfortable with application development, it may be an option (Brian’s post covers this option as well).  I know that JetBrains Rider comes with an “Assembly Explorer” which allows you to view a decompiled version of a DLL.  This allows you to attempt the arduous process of recreating the code base by copying and pasting the decompiled code into new files you create manually.   There may be other tools that allow you do decompile some DLLs but I’ve only done this with Rider on a small project and I’ve never tried to automate for something larger.  Newer versions of Visual Studio may have this feature (see this blog post), but again I haven’t used it.

The code you’re going to end up with is not going to look identical to what the vendor wrote but it should be functionally equivalent.   In my experience it won’t be as easy to maintain as the original code because it will be less readable. 

If there is any possibility to contact the consultant you no longer work with to get the source code, that’d be the best option for the long run.

As an aside, if you continue to get the failed type errors you can delete the customization’s DLL and PDB files from your site’s Bin/ directory to remove the invalid code from the system.  If the errors keep happening, I’ve found it can help to re-run the Acumatica ERP configuration program in Windows, perform application maintenance and click the drop-down part of the Upgrade button.  Select “Upgrade Only Website”.  This should fix any DLL files being at older versions after trying to deploy an incompatible customization.  Just keep in mind this is going to be like reinstalling the site so be sure to back it up ahead of time.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved