Outsystems Extensions, using .NET 2.0+

Outsystems Extensions, using .NET 2.0+

  
how would I implement an outsystems extension that depend on a library that requires .NET 3.5?


The only thing you need to change is the compiler path settings for the extension. Once you do that, everything works as expected. One word of warning, though, is that it seems like changing the compiler path for an extension only works for Integration Studio, if you try to deploy the extension via Service Center, that setting seems to be ignored, so .NET 3.X extensions need to be published from Integration Studio to each Platform Server that you need them on. I keep forgetting to file a bug about this.

J.Ja
Hello

"The only thing you need to change is the compiler path settings for the extension. "

Wouldn't this break? I thought outsystems was using .NET 2.0? 

Can someone from outsystems confirm .NET 3.5 will function correctly on outsystems 5.1.


No, it does not break. The reason is that .NET *Framework* 3.0 and 3.5 still run on .NET *CLR* 2.0. I know, it sounds goofy. But the reality is, .NET 3.0 and 3.5 are both mere *libraries* on top of the .NET 2.0 CLR. Even the stuff like the var keyword and LINQ in C# 3 are functions of the compiler, but it still boils down to .NET 2.0 bytecode. At the same time, it is *not* compatible with .NET 4 yet (to the best of my knowledge), when I checked a few months ago you could not use .NET 4 for extensions because .NET 4 does indeed have a different CLR.

And I have done this with a number of extensions with no issues (other than the one previously mentioned). I suggest you give it a try, it will only take a minute to make the change and it is easily reversed. :)

J.Ja
"No, it does not break. The reason is that .NET *Framework* 3.0 and 3.5 still run on .NET *CLR* 2.0. "
 
Yes that is correct, the reference that we use , is targeted at .NET 3.5 and I can see that it makes reference to linq. 
 
I will change the target framework to .NET 3.5 and see if outsystems will give me any issues.

I guess you confirmed Service Center has compiling issues, integration studio will compile ok.

Now with Service Studio, when you reference an Extension that targets .NET 3.5, .... this may cause some issues?
 
Be aware that if you use LINQ or HashSet or any other thing from .NET 3.5 that is not compiler syntax only (like var), you will have to have .NET 3.5 installed also at the server, or else you'll get runtime errors about not being able to find System.Core.dll and other similar dlls.

Best Regards,
Gustavo Guerra
Thanks Justin and Gustavo 

So far it works.
Robert -

Glad to hear that! Like I said, the *only* issue that I know of, is that Service Center can't package that extension into a solution (it always seems to use the 2.0 compiler and framework), so when you deploy your app to a server, you'll need to manually publish the extension to the server through Integration Studio.

J.Ja