These are the steps I followed so far on my Ubuntu machine:
Install LibreOffice sdk: sudo apt-get install libreoffice-dev
Locate the setenv file for LibreOffice by typing the following command on the terminal: locate setsdkenv_unix.sh
Try executing the script: . /usr/lib/libreoffice/sdk/setsdkenv_unix.sh
Install Microsoft SDK for Unubtu/Debian/RHEL: sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0
I believe the development environment is set up for C#.
If you can post your sample code, I will try to compile and execute it.