2 projects ... different behaviour of my XIF

Hi all,

I just build a XIF in C# (using Spire.XLS libraries).

In my first project everything works fine: I have 6 actions ... no problem at all.

In my second project I have an error on the second action ... but it is the same XIF !!!

How is possible ?

I made several releases of that XIF ... maybe something is not "aligned" ??

Hi Luca,

Can you share with us more details? What error do you have? In what scenario that error appears?

Can you share some code with us?

Best regards,


Hi Luca,

You likely know very well that the same code can behave differently depending on the circumstances, like different parameters etc. If you are worried that you're not using the right version, make sure the whole app is published, so if you have module A consuming module B that consume the Extension, make sure to publish first B, then A.

thanks for your answers ...

basically is a XIF containing 11 actions that use the Spire.XLS library (open an Excel document, write a value in a cell, save an Excel file, etc.)

In the project A everything works fine: I use 6 actions ... I can create my Excel document and I'm able to download it.

In the prohect B, at the second action, I have an error regarding the Spire DLL I used in my C# project

"The type initializer for 'spr¿' threw an exception."

but, I say it again, it's the same XIF ... the action takes a binary as input, and give me an object in output


Can you create two separate sample C# Test Apps and link to this library in C# and see if you are getting the same error. 

Easier to debug and fix it in the C# world. 



Hi Amal, I already tried the C# code and it works correctly


in the same project I have a second Spire library ... the Spire.DOC (used to manipulate Word files).

if I have BOTH XIFs in my project ... I have that error message !

I'll fix it !!!

Welcome to DLL hell :)

It was the only thing I never "noticed" in a week ... that means one thing I didn't know: all the XIFs work in all my project ! That's terrible !!!

I use one XIF in a page, the a second XIF on another page ... why they "interact" ???


Hi Luca,

All DLLs and other files included in the Extension are put into a single folder in IIS. If you have two DLLs with the same name (but different versions), this could lead to problems. Also, your code might just call the wrong DLL (not sure how that works in C#). It has however nothing to do with OutSystems, at least not explicitly.


thanks Kilian ... I missed that "detail" ...

every day I learn something new !

Hi Luca,

Ain't life beautiful? :) Happy coding!