So, for my project I will have lots of CSV files that will populate my Outsystem entities.  I've been using the built-in bootstrap process up until now (converting CSV to XLS manually) but there are things that Excel assumes that will cause me problems.  Besides, its an easy way to get started writing an extension.  (Note - I already looked at the existing CSV extension in Forge and it doesn't have the import process I need.)

I'm on version 8.0.1 of the platform and am using Visual Studio 2010.  I found a good routine for my CSV function on the Internet, created a new Class Library project and created a .dll.  I then run the Import Actions from .Net wizard and point it at the .dll I created and I get a message 'not a valid assembly'. 

Also, in the existing Forge extenstion it shows the .cs files in the resources.  I tried to add my file and it just bring up Visual Studio and nothing happens in Integration Studio.

I've attached the dll and cs files.  Any help is appreciated.

Curt -

What version of .NET was the DLL compiled against? Beleive it or not, Integration Studio is limited to .NET 3.5 or earlier. :(

My experience with the "Import Actions" has been that most .NET libraries are not writen in a way that make sense in OutSystems. It will work mind you, but using it will feel very strange.

My recommendation is to wrap the CSV functions up so that it reads the file and outputs the data in a RecordList of generic Structures, and then use the Action in Service Studio to do the actual import. In your Extension, you can add references to your DLL or any external libraries you need to use to write your code.

That's it, by default it creates .Net 4.0.  Yes, your suggestion is what I was planning on but I was just trying to get something to work.  Thanks again!
Hello Curt,

I find it to be easier creating an extension the other way around, by creating the actions I want in Integration Studio and then filling in the code.

While a library's functions may be useful in C# or Java code, they don't always translate well directly to an OutSystems API.

You may want to try this approach for benchmarking reasons :)

I also had alot of csv files and what I did to automate the process completely and to use the csv file direcly without converting it to excel was to do a binary to text to read the csv file. Then parse the csv file record by record and create a record list. Then use the record list created just like the Excel import widget passes it in. Csv files have alot of things to consider, like what delimiter is used, also if the delimiter is used within the cell, also if a cell is surrounded with double quotes, also if a cell contains a line break. These are some of the exceptions. I was planning to create an import csv extension also, but time available has prevented me from doing this thus far.

Hope this helps,

Thanks for all the helpful suggestions.  I will definitely try these approaches and see what works best for me.
I've done it Wayne's way as well, when it was a simple CSV that I knew and controlled (no weird things around text delimiting) and it worked nicely. One day I encountered a really ugly CSV that had less-than-consistent rules around text delimiting and a few other challenges, so I found a nice CSV parser and wrapped it. The former approach is faster & much easier to debug since it can all be inspected in Service Studio. The latter gave me a pretty quick, pre-tested solution when I could have spent a lot of time wrangling code to fit an inconsistent file.

Would you be interested in sharing that second solution?  I think I found a pretty good parser also but obviously if you already did this it would save me some time.  Thanks again for all your help.
Sorry, all code on a project that got blown away a while back. :(