Jiwa 157 "could not load file or assembly"  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Jiwa 157 "could not load file or assembly"

Postby neil.interactit » Wed Apr 20, 2016 12:47 pm

Hi guys,

I have an external application running against Jiwa which updates Jiwa correctly via business logic (ie. Jiwa DLL calls) rather than hack updating via direct database access. It has broken with the upgrade to 157.

So the app is:
- a standalone C# (VS2015.2) application
- includes references to JiwaApplication.dll, JiwaODBC.dll, JiwaSales.dll and JiwaServiceManager.dll
- these are referenced in situ (ie. C:\Program Files (x86)\Jiwa Financials\Jiwa 7\)
- these are "copy local: false"
- the app is then installed into C:\Program Files (x86)\Jiwa Financials\Jiwa 7\ (so that those DLLs can find further associated that they reference)

This was developed against 115. It was successfully upgraded to 149, by installing Jiwa 149, then recompiling (against the now updated C:\Program Files (x86)\Jiwa Financials\Jiwa 7\ DLLs).

This process was repeated with 149, but the app executes with the following error:

dll157.png
dll157.png (3.51 KiB) Viewed 4288 times

That is to say, the app executes OK, shows its own login screen, etc, but then fails with that error on the first Jiwa function call.

I have been through this repeatedly backwards and forwards, but can't work out what is different between 115 to 149 and 149 to 157.

All help appreciated!

Cheers,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Jiwa 157 "could not load file or assembly"

Postby Atronics » Wed Apr 20, 2016 2:33 pm

When recompiling, have you changed the target .net to version 4.6.1?
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: Jiwa 157 "could not load file or assembly"

Postby Scott.Pearce » Thu Apr 21, 2016 9:25 am

As Atronics pointed out, .Net target is now 4.6.1 (this is a change since 7.0.115.0) - you likely have to recompile to target 4.6.1.

Also, JiwaSendMail.dll has been retired - your project *may* have a reference to this even though you don't use it (referencing JiwaApplication.DLL used to suck it through because it reference it). Check your project references and remove JiwaSendMail if it exists.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Jiwa 157 "could not load file or assembly"

Postby neil.interactit » Fri Apr 22, 2016 10:45 am

Hi Scott,

Yes, definitely. First step was to target 4.6.1 ... the issues above occurred after that. And JiwaSendMail is not referenced at all.

Cheers,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Jiwa 157 "could not load file or assembly"

Postby Scott.Pearce » Fri Apr 22, 2016 11:06 am

It could be a 32-bit, 64-bit conflict. At this stage Jiwa is 32-bit only. Make sure all your stuff is 32-bit, and is only attempting to load 32-bit assemblies (Jiwa or otherwise). Also, disable all plugins to isolate the issue.

Code: Select all
UPDATE SY_Plugin SET IsEnabled = 0
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Jiwa 157 "could not load file or assembly"  Topic is solved

Postby neil.interactit » Wed May 04, 2016 11:26 am

Thanks for your time today Mike to sort this.

In case anyone else ends up here ... the solution involved adjusting the project to target x86 rather than any cpu, and implementing Mike's patch from https://forums.jiwa.com.au/viewtopic.php?f=26&t=578&p=2007#p2011.

Thanks again,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests