Skip to main content
Solved

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


Forum|alt.badge.img

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

Best answer by hkabiri

@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.
View original
Did this topic help you find an answer to your question?

3 replies

hkabiri
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Support Team
  • 226 replies
  • Answer
  • March 30, 2023

@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.

Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 59 replies
  • March 30, 2023

Hi @hkabiri ,

Thank you so much. I will try this.

 

Regards,

Ramya Krishna


  • Freshman I
  • 1 reply
  • July 7, 2024

Hi In my case the config file matched with the version of the file which is 6.0.0. By the way I am taking the training T200 Maintenance Forms 2024 R1. When I finished the Step 1.8.4: Build the Project in Visual Studio. After built the project on VS and start including the extension library in the customization project the error came up when I refreshed the app : 

Server Error in '/SmartFix_T2001' Application.

Could not load file or assembly 'System.Security.AccessControl' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings