0

Downloaded the Sage 50 SDK (Simply Accounting) that has C# Example code to run if we want to add information to Sage 50 Accounting Software.Nothing has been modified on my side yet but running the example code i am getting Following Error.

 Could not load file or assembly 'Sage_SA.Work, Version=1.0.0.1, Culture=neutral, PublicKeyToken=04796331da23c125' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

this error occur when i reach to following code

if (SDKInstanceManager.Instance.OpenDatabase(saiFile, username, password, false, "Sage 50 SDK Sample Program", "SASDK", 1))
     {

the dll exist in the same folder and Version looks same.I am using Sage 50 SDK Release 2017.2 Any help will be appreciated.

Another user that have same problem is here in the link but using different version than i have.

http://sagecity.na.sage.com/support_communities/sage_50_accounting_ca/f/sage-50-ca-installation-upgrades-and-converting/80763/unable-to-use-sage_sa-work-dll-in-sage-sdk

Garry
  • 4,996
  • 5
  • 32
  • 44
  • This error suggests that there is an assembly mismatch. You may need to cross-check the versions. Also, see https://stackoverflow.com/questions/215026/the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference – Subbu Aug 01 '17 at 17:44
  • well i have matched the assembly in dll already and it looks same as Version=1.0.0.1 – Garry Aug 01 '17 at 17:50

1 Answers1

0

After spending one day to solve the issue.I am answering my own question for Future readers to explain that you may not get Proper error from

Sage_SA.Work.dll 

So try other approaches also. In my case i was using Sage database that was on Network Server but the sage connection manager expect on local Computer. But i was not getting proper Error in that case because of this dll.I was able to fix that error by using the Local database of sage on my computer.

Garry
  • 4,996
  • 5
  • 32
  • 44