sql-server-language-extensions icon indicating copy to clipboard operation
sql-server-language-extensions copied to clipboard

Add Linux support for .NET

Open MarkpageBxl opened this issue 1 year ago • 2 comments

Currently, SQL Server Language Extensions only support .NET on Windows, whereas the other backends do run on Linux. We currently ship a feature that leverages the .NET language extensions, but see growing appetite amongst customers to move to SQL Server on Linux, which we thus cannot support.

Are there any fundamental technical constraints that prevent this? I would assume that since we are leveraging .NET as opposed to .NET Framework (as in the SQL Server assembly feature), this should be feasible in a fairly straightforward manner.

Would changes need to be done on SQL Server itself to support this? Or would it be limited to the .NET language extensions assembly provided here?

Thank you for any insights.

MarkpageBxl avatar Sep 04 '25 12:09 MarkpageBxl

From what I could gather, we build a C++ glue library which currently links to a provided hostfxr library, and relies on Win32 calls to do its work (in particular, dynamically loading hostfxr).

As such, my understanding is that porting this glue library to using a Linux libhostfxr.so and syscalls would effectively make this feature work on Linux. If anyone can confirm, it would be appreciated.

MarkpageBxl avatar Sep 05 '25 10:09 MarkpageBxl

We have proposed pull request #64 to add this feature.

MarkpageBxl avatar Sep 17 '25 08:09 MarkpageBxl