https://bugs.documentfoundation.org/show_bug.cgi?id=165608
Bug ID: 165608
Summary: LibreOffice .NET SDK examples are bind to a specific
version
Product: LibreOffice
Version: 24.8.0.3 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
Description:
LibreOffice .NET SDK examples are bind to version 8.0, which prevents build
with .NET 9 or other versions.
Steps to Reproduce:
1. Install .NET 9 SDK and check its version with:
dotnet --info
2. Build LibreOffice from sources with --enable-odk and .NET support enabled
https://wiki.documentfoundation.org/Development/How_to_build
3. Try building a .NET example like WriterDemo C# example:
$ cd instdir/sdk
$ ./setsdkenv_unix
$ cd examples/dotnet/WriterDemo/csharp
$ make
$ make WriterDemo.run
Actual Results:
You will face error which prevents you from building the example:
----------
You must install or update .NET to run this application.
App: ~/libreoffice25.8_sdk/LINUXexample.out/bin/WriterDemo
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /usr/lib/dotnet
The following frameworks were found:
9.0.2 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=ubuntu.22.04-x64&os=ubuntu.22.04
make: *** [Makefile:70: WriterDemo.run] Error 150
Expected Results:
You should be able to build example
Reproducible: Always
User Profile Reset: No
Additional Info:
This shows the target framework version set to 8.0 in the ODK examples:
$ git grep TargetFramework odk
...
If you look into odk/examples/dotnet/WriterDemo/csharp/Makefile for example,
you will see:
<TargetFramework>net8.0</TargetFramework>
This should be parametric, for example like application name:
<AssemblyName>$(APP_NAME)</AssemblyName>
Please note that due to tdf#165585, you may not be able to build examples using
SDK binaries, and you should build LibreOffice from sources for now.
tdf#165585 - LibreOffice SDK binaries lack cross platform dotnet binding files
https://bugs.documentfoundation.org/show_bug.cgi?id=165585
Please also note that the current stable version of .NET is 9.0.2, released on
12 November 2024:
https://github.com/dotnet/core
To install the latest .NET on your OS, you may need instructions from here:
https://learn.microsoft.com/en-us/dotnet/core/install/
-----------
I am testing with the latest LO 25.8 dev master:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f78397068fa7fd403046605fb37620fba7a76e63
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded
--
You are receiving this mail because:
You are the assignee for the bug.