Bug 113787 - CLI versioning: cli_oootypes.config is wrong
Summary: CLI versioning: cli_oootypes.config is wrong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.4
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 16:54 UTC by kpreisert
Modified: 2017-12-14 17:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kpreisert 2017-11-12 16:54:31 UTC
Description:
I have a .NET (C#) application that uses the LibreOffice CLI assemblies. When I upgraded my LO installation from 5.3.7 to 5.4.3 this application doesn't work anymore, because it can't find the .NET assembly "cli_oootypes, Version=1.0.8.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e". I noticed that in 5.4.3 (I don't know which version exactly) the version numbers of the CLI assemblies have been increased (probably related to https://bugs.documentfoundation.org/show_bug.cgi?id=108709), so that the assembly installed by LO 5.4.3 is now at version 1.0.9.0.

This in itself shouldn't be a problem, because the are policy files which redirect references to old versions to the new (istalled) version. However, the corresponding policy file cli_oootypes.config contains the following line:
<bindingRedirect oldVersion="CLI_OOOTYPES_OLD_VERSION" newVersion="CLI_OOOTYPES_NEW_VERSION" />

This is wrong. It should be:
<bindingRedirect oldVersion="1.0.0.0-1.0.8.0" newVersion="1.0.9.0" />

I guess that some build scripts didn't correctly replace the variables here? I also noticed that cli_oootypes.config contains a license header, whereas the other *.config files (e.g. cli_basetypes.config) do not.

Steps to Reproduce:
Compile a .NET application that references and uses cli_oootypes.dll at version 1.0.8.0, then try to run it with a newer LO installation that contains version 1.0.9.0.

Actual Results:  
Can't find .NET assembly "cli_oootypes, Version=1.0.8.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e"

Expected Results:
.NET assembly reference should be redirected, application should work as usual


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Comment 1 kpreisert 2017-11-12 17:19:57 UTC
After manually fixing this in my installation, there is another problem with the assembly versions: I have also referenced version 1.0.22.0 of cli_cppuhelper.dll, which is redirected by cli_cppuhelper.config to 1.0.23.0.

However, the version of cli_cppuhelper.dll that is actually installed by LO 5.4.3 has version number 0.0.0.0, so version 1.0.23.0 cannot be found as well.
Comment 2 Julien Nabet 2017-11-12 19:02:33 UTC
Michael: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=e0487a112984b8151450b07fb1c05deaedc973e5, thought you might be interested in this one.
Comment 3 Commit Notification 2017-11-24 00:31:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9673dbf3a19740b22ecb99721dab9b03cae76509

tdf#113787: always require version file with config for CLI assemblies

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2017-11-24 00:31:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb9413907cd7bea0feadb7e4e3d44d5078fe5a26

tdf#113787: gbuild: fix the version of cli_cppuhelper assembly

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Michael Stahl (allotropia) 2017-11-24 12:21:36 UTC
there were 2 different problems in the makefiles that were causing
the missing versions; should be fixed on master, and
backports are waiting for review in gerrit.

note to self: "ILSpy" can display these version numbers;
if you look at File->Properties in Explorer that also
displays some version numbers but those are apparently not relevant.
Comment 6 Commit Notification 2017-11-24 16:21:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c3a33bb99274d25f0413815b8ecd9ce0fb4ea50&h=libreoffice-5-4

tdf#113787: always require version file with config for CLI assemblies

It will be available in 5.4.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2017-11-24 16:21:19 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6d1d4ebb8b5b1fc753f5cb3439703705ffcff270&h=libreoffice-5-4

tdf#113787: gbuild: fix the version of cli_cppuhelper assembly

It will be available in 5.4.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (allotropia) 2017-12-14 11:50:09 UTC
how are things looking in 5.4.4.2, are there still wrong version numbers somewhere?

http://dev-builds.libreoffice.org/pre-releases/win/
Comment 9 kpreisert 2017-12-14 17:21:05 UTC
Everything seems to work for me with 5.4.4.2, thanks!
Comment 10 Michael Stahl (allotropia) 2017-12-14 17:30:32 UTC
great, let's call this fixed then.