Solved

Upgrade Error: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe' or one of its dependencies

  • 30 March 2023
  • 2 replies
  • 1044 views

Userlevel 4
Badge

Hi Team,

I’m facing issue after upgrading my customization code from 2020R2 to 2022R2. After, referring to the latest Dll, I compiled my Code. then Later on i cannot access to instance. Below is the error for your reference. 

Its urgent, could anyone please help me on this.

 

Regards,

Ramya Krishna

icon

Best answer by hkabiri 30 March 2023, 17:45

View original

2 replies

Userlevel 6
Badge +5

@ramya15

  1. Find this file under your application Bin Folder:

System.Runtime.CompilerServices.Unsafe.dll

Go to properties>Details and note the product version. If it is something other than 5.0.0 xx you may need to do changes on the web config dependentAssembly part: (below is a example and you may want to try adjusting the New Version based on what your file version is)

Make sure you keep a copy of Web config file somewhere before making any changes.

      <dependentAssembly>        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />        <bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />      </dependentAssembly>
  1. Deploy a new instance linked to same DB and the application should work without any problem.
Userlevel 4
Badge

Hi @hkabiri ,

Thank you so much. I will try this.

 

Regards,

Ramya Krishna

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