Page 1 of 1

Inherit from any form in the Sales UI DLL Errors

PostPosted: Mon Apr 04, 2022 6:12 pm
by SBarnes
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?

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

PostPosted: Tue Apr 05, 2022 1:39 pm
by Mike.Sheen
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.

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

PostPosted: Tue Apr 05, 2022 2:20 pm
by SBarnes
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.

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

PostPosted: Tue Apr 05, 2022 5:31 pm
by Scott.Pearce
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.

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

PostPosted: Tue Apr 05, 2022 6:00 pm
by SBarnes
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.

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

PostPosted: Tue Apr 05, 2022 6:33 pm
by Mike.Sheen
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.

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

PostPosted: Tue Apr 05, 2022 6:38 pm
by SBarnes
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.