Nuget package for C#

Ilya Sokolov is at rula-tech.com
Thu Mar 27 12:18:45 UTC 2025


Hello, Hossein

Thank you for the advice, it helped.

I successfully managed to run the WriterDemo example and to connect to the
Libre Office from my application.
The differences between the .Net Core API and the API used for .Net
Framework are astonishing.

Could you tell me if there is an example of how to get Libre Office version
if .Net?







On Wed, Mar 26, 2025 at 5:54 PM Hossein Nourikhah <hossein at libreoffice.org>
wrote:

> Hello Ilya,
>
> I think it would be better that you try running the SDK examples first,
> for example:
> odk/examples/dotnet/WriterDemo/csharp/
>
> That exception can be caused by wrong or incomplete configuration during
> the execution. For me, invoking 'make WriterDemo.run' succeeds (on
> Linux), but manually trying to run the example using 'dotnet run' fails
> with exception, because some environment variables are not set.
>
> For the DLL files, I assume that they should be specific to each version
> of LibreOffice, and they should be shipped with LibreOffice SDK, which
> is not happening the moment, because of the bug tdf#165585.
> https://bugs.documentfoundation.org/show_bug.cgi?id=165585
>
> On the other hand, the code for .NET binding has not been touched
> recently. Therefore, I guess the DLL files should remain the same. I
> think before any further changes to the .NET binding, we should first
> resolve tdf#165585 anyway. But, that should not prevent you from running
> the examples when you build LibreOffice yourself. Please try again, and
> tell if you could run the examples.
>
> Regards,
> Hossein
>
> On 26.03.2025 10:00, Ilya Sokolov wrote:
> > Thanks for the manual, the manual works, the build was successful and
> > the  LibreOffice.Bindings.0.1.0.nupkg has appeared in the dotnet
> > folder.
> >
> > Could you tell me if I am right that net_basetypes.dll,
> >
> net_bootstrap.dll,net_bridge.dll,net_oootypes.dll,net_uno.dll,net_uretypes.dll
> > should be redistributed with the application which uses the SDK?
> >
> > Am I right that the compiled SDK can be user with any LibreOffice
> > redistribution (with same bitness, e.g. x64) starting with 25.2.1.2?
> > Or the SDK can be used with the LibreOffice which I had compiled with
> > the SDK?
> >
> > The second question arises from the fact that if I try to run the SDK
> > on a PC, where the LibreOffice  25.2.1.2 (X86_64) is installed I got
> > an exception  in net_bridge.dll   on the call
> >
> > private XComponentContext m_HnComponentContext = null;
> > m_HnComponentContext = NativeBootstrap.bootstrap();
> >
> > The exception says that : "Attempted to read or write protected
> > memory. This is often an indication that other memory is corrupt."
> >
> > Could you tell me if there is a way to eliminate the error? What may
> > cause the error?
>
> --
> Hossein Nourikhah, Ph.D., Developer Community Architect
> Tel: +49 30 5557992-65 | Email: hossein at libreoffice.org
> The Document Foundation, Winterfeldtstraße 52, 10781 Berlin, DE
> Gemeinnützige rechtsfähige Stiftung des bürgerlichen Rechts
> Legal details: https://www.documentfoundation.org/imprint
>


-- 
Best Regards,
Ilia Sokolov

Head of Software Development
RULA Technologies SIA
Balta Iela 7, Riga, LV-1055, Latvia
+371 66102184
http://rula-tech.com
E-mail: is at rula-tech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20250327/6f79251f/attachment.htm>


More information about the LibreOffice mailing list