Inherit from any form in the Sales UI DLL Errors  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Inherit from any form in the Sales UI DLL Errors

Postby SBarnes » Mon Apr 04, 2022 6:12 pm

Any attempt within Visual Studio 2017/2019 to Inherit from any of the forms inside the Sales UI dll produces a complaint about the Jiwa Application DLL reference not being able to be added or of the wrong version.

Removing any references and retrying produces the same error, even trying a new project gets the same error, on both the projects created inheriting from say Inventory Maintenance creates the screen/form with out any issue.

Any ideas on how to get around this?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Inherit from any form in the Sales UI DLL Errors

Postby Mike.Sheen » Tue Apr 05, 2022 1:39 pm

SBarnes wrote:Any attempt within Visual Studio 2017/2019 to Inherit from any of the forms inside the Sales UI dll produces a complaint about the Jiwa Application DLL reference not being able to be added or of the wrong version.

Removing any references and retrying produces the same error, even trying a new project gets the same error, on both the projects created inheriting from say Inventory Maintenance creates the screen/form with out any issue.

Any ideas on how to get around this?


If I were to try and repro this, are these the steps I would need to follow - please interject if they vary:

1. Install VS 2019
2. Install Jiwa (version 7.2.1 and then SR11?)
3. New VS Project - Windows Forms targeting .NET Framework 4.71
4. Set platform to x86
5. Add references to JiwaApplication.dll, JiwaSalesUI.dll - and any others needed for next step:
6. Add a new form - inherited form based on JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.BaseSalesOrderEntryForm (or were you trying with SalesOrderEntryForm ?)
7. Error occurs

Following similar steps, but adding references to JiwaInventoryUI.dll and adding a new form inherited from JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm and the error does not occur.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Inherit from any form in the Sales UI DLL Errors

Postby SBarnes » Tue Apr 05, 2022 2:20 pm

Pretty much it but the problem occurs with VS2017 or VS2019 and the framework target is 4.8 and the error occurs against sales orders or quotes screens and it doesn't matter if the references are there or not to start.

No service release is in use.

I've also checked and you can drop say Jiwa grid or any of the other stuff Jiwa uses as 3rd party on a standard win form with no issues.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Inherit from any form in the Sales UI DLL Errors

Postby Scott.Pearce » Tue Apr 05, 2022 5:31 pm

It worked for me after I added all Jiwa*.dlls as references. In my experience VS is not very good at walking the dependency tree. So:

1. Add references to all Jiwa*.dll files
2. Add inherited form

Through trial and error you could probably add less Jiwa references, but the compiler should remove unused references at compile time anyway.

EDIT: I should add I set my external project to use Framework 4.7.1, x86 and VB.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Inherit from any form in the Sales UI DLL Errors

Postby SBarnes » Tue Apr 05, 2022 6:00 pm

Maybe its the 4.7 vs 4.8 but I don't see why that should make a difference, the other way would make sense but being on the higher release shouldn't.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Inherit from any form in the Sales UI DLL Errors

Postby Mike.Sheen » Tue Apr 05, 2022 6:33 pm

SBarnes wrote:Maybe its the 4.7 vs 4.8 but I don't see why that should make a difference, the other way would make sense but being on the higher release shouldn't.


That's probably irrelevant. Scott was just being thorough and stating what he knows worked for him.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Inherit from any form in the Sales UI DLL Errors  Topic is solved

Postby SBarnes » Tue Apr 05, 2022 6:38 pm

And it now working for me on the same machine it wasn't the other day under 4.7 and 4.8 go figure, the only difference I can see is the two projects that don't work were originally created in vs 2017 but again that should be irrelevant to the whole thing.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 12 guests