Using extra custom libraries in an IDO Extension Class

I'm looking to employ more code re-use in my CSI development. How does an IDO Extension Class (IEC) handle additional 3rd party library references? In this situation, I'm looking to create a BarTender library that handles all of the creation/etc of our bar codes. There are two was I can see to accomplish this:

  1. Create the library class, but instead of linking in a DLL, include the C# .cs file as part of the project. This way, the library gets completely built inside my IEC.
  2. Create/compile the library as a DLL and then link the DLL as needed into projects.

Thanks!

Parents
  • You add it separately to the IDO Custom Assemblies form, which puts it in the Global Cache. Then you create a reference to that .dll in the IDO Custom Assembly you want to use it in, setting the property for that reference to not copy local (just like you do for the Infor ones).

  • I'm finally doing this after all this time. I have a need to import CSV file data into CSI & it makes sense to put everything server side. If I am understanding you correctly, all I need to do is upload each required DLL into the IDO Custom Assembly.

    Quick clarifications:

    -Does the name of the IDO Custom Assembly need to be anything specific, or will CSI be able to figure out what the needed library automatically?

    -When you say "add a reference to that DLL", that's the same as what you'd do for any DLL. Ex: using CsvHelper; (C#). 

    -What do you mean when you say "set property reference to not copy local"?

  • I'll do my best to explain. What you name it on the IDO Extension Classes form does not matter. What does matter is the namespace name in the .dll, as that is what you will reference in your Visual Studio project. For example, when you type "using Mongoose,IDO;" in your class file, you are referencing the namespace in the IDOProtocol.dll file. So while you add "MyLibrary.dll" to the IDO Extension Classes form as "MyLibrary". What you will reference in code is the namespace name which could be "using MyCoolLibrary;".

    For the last question, when you add the Mongoose libraries to your Visual Studio project, you are supposed to click each one in the References list, and change the property "Copy Local" to False, so they are not copied to your Debug or Release folder when you compile your project. You want to do the same thing with any third party .dll.

Reply
  • I'll do my best to explain. What you name it on the IDO Extension Classes form does not matter. What does matter is the namespace name in the .dll, as that is what you will reference in your Visual Studio project. For example, when you type "using Mongoose,IDO;" in your class file, you are referencing the namespace in the IDOProtocol.dll file. So while you add "MyLibrary.dll" to the IDO Extension Classes form as "MyLibrary". What you will reference in code is the namespace name which could be "using MyCoolLibrary;".

    For the last question, when you add the Mongoose libraries to your Visual Studio project, you are supposed to click each one in the References list, and change the property "Copy Local" to False, so they are not copied to your Debug or Release folder when you compile your project. You want to do the same thing with any third party .dll.

Children
  • Thank you. I think that's cleared everything up for me. It doesn't look like I will have to do this just yet. I needed to import some Excel spreadsheets into CSI 9 (on prem), and Microsoft Office 365 is installed on our Utility Server. This has placed the required Office DLLs into the server's GAC automatically. Initially, I was looking to use CSVHelper but I managed to work out how to upload an Excel file to the Utility server through a Form.

    I'm going to keep this bookmarked for future use as I can absolutely see me needing to do this in the future.

    Thank you for all your help with this. It is greatly appreciated.