Background
We hoped to upgrade from 2021 R1 to 2021 R2 last year, but other projects pushed the upgrade back when we ran into upgrade issues on the workflow. However, I did preliminary work on the upgrade to get complete the development for testing with very little difficulty on the code side. Since we ran into trouble with our UI based customization project for the new workflow engine, we focused on reworking our workflows to be coded in Visual Studio and never made it to the rollout of 2021 R2. (This is important to know as it means the problem did not exist in upgrading from 2021 R1 to R2.)
Getting an Error
The time has come for us to upgrade to 2022 R1 (22.102.0054), and I ran into a rather peculiar problem. While we do not use Payroll in Acumatica, I kept getting errors preventing publishing my customization project due to a problem with Payroll.
By going into the customization project and selecting Show Active Extensions on the Extension Library menu, the errors (or something very similar) that I saw when attempting to publish my project were displayed as shown here in red.
Failed to load types from assembly PX.Objects.PR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null with message: Could not load file or assembly 'PX.Payroll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e' or one of its dependencies. The system cannot find the file specified.
Failed to load types from assembly PX.Payroll.WebServiceClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e with message: Could not load file or assembly 'PX.Payroll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e' or one of its dependencies. The system cannot find the file specified.
Fixing the Error
Upon further investigation, it appeared that my instance/bin folder was missing the aforementioned PX.Payroll.dll file. Out of curiosity, I checked my Acumatica ERP installation in the files/bin folder which is the source of bin files copied to new instances, and it was not there either. On a whim, I decided to run the installation again. This time, already upgraded, the installation offered a Repair option, so I selected that option. When finished, I magically had a PX.Payroll.dll file in my Acumatica ERP installation int he files/bin folder. Oddly, while most DLL’s were dated 4/5/22, my PX.Payroll.dll file was dated 6/17/21. Regardless, copying this file over to my instance/bin folder allowed the DLL to load, and my error went away.
Repeating the Problem
I maintain multiple development environments when attempting major version upgrades. This issue occurred on my dev sandbox machine initially. Having the 2021 R2 environment on my local (work tablet) dev machine, I upgraded to 2022 R1, restored snapshots and customization projects from my other dev machine where I had just “fixed” the Payroll dll issue. Once again, the PX.Payroll.dll file was missing entirely from this second dev machine. After copying the missing file from my first dev machine, the error went away on the second dev machine.
Not Consistently a Problem
My sysadmin maintains a “playground” environment where he tests my early project builds for upcoming major Acumatica version upgrades. When he upgraded his instance, he had the PX.Payroll.dll file. He found it odd that his file also had the 6/17/21 date, but it matched mine. This tells me that not everyone is subject to this issue. Hopefully, it won’t impact you. However, if you try to upgrade to 2022 R1 and start getting errors about PX.Payroll, now you know what to do.
Happy coding!