FS#71007 - [mono-msbuild] System.Reflection.Metadata 5.0.0.0 dependency is not satisfiable
Attached to Project:
Community Packages
Opened by HebaruSan (HebaruSan) - Monday, 24 May 2021, 23:07 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 18 August 2022, 15:17 GMT
Opened by HebaruSan (HebaruSan) - Monday, 24 May 2021, 23:07 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 18 August 2022, 15:17 GMT
|
Details
Description:
This package requires the System.Reflection.Metadata.dll assembly version 5.0.0.0 to function, see /usr/lib/mono/msbuild/Current/bin/MSBuild.dll.config : <dependentAssembly> <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> </dependentAssembly> However, this version of the DLL is not provided by this package or by Arch's Mono package, so installing this package results in failures for users who attempt to use it. $ for F in $(find /usr/lib/mono -name System.Reflection.Metadata.dll -type f) ; do echo $F ; monodis --assembly $F | grep Version ; done /usr/lib/mono/4.5/System.Reflection.Metadata.dll Version: 1.4.3.0 /usr/lib/mono/msbuild/Current/bin/Sdks/ILLink.Tasks/tools/net472/System.Reflection.Metadata.dll Version: 1.4.2.0 /usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/tools/net472/System.Reflection.Metadata.dll Version: 1.4.2.0 /usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk.Razor/tasks/net46/System.Reflection.Metadata.dll Version: 1.4.5.0 Steps to reproduce: 1. sudo pacman -S mono msbuild 2. Try to compile any C# project 3. Get error: /usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2198,5): error MSB3248: Parameter "AssemblyFiles" has invalid value "/usr/lib/mono/4.5-api/mscorlib.dll". Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Side note, I am not primarily an Arch user. I installed it in a virtual machine to investigate repeated problem reports that have been submitted to a free project with which I try to help, see https://github.com/KSP-CKAN/CKAN/issues/3361 . It would be fantastic if this package could be fixed so other free software developers would not continue to receive bug reports for this. |
This task depends upon
/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): error MSB3248: Parameter "AssemblyFiles" has invalid value "/usr/lib/mono/4.5-api/mscorlib.dll". Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
If I revert mono-msbuild to 16.8.xamarinxplat.2020.07.30.15.02-2, I don't encounter the error.
Additional info:
$ pacman -Qi mono
Name : mono
Version : 6.12.0.122-1
Description : Free implementation of the .NET platform including runtime and compiler
Architecture : x86_64
URL : https://www.mono-project.com/
Licenses : GPL LGPL2.1 MPL
Groups : None
Provides : monodoc
Depends On : zlib libgdiplus>=4.2 sh python ca-certificates
Optional Deps : None
Required By : dbus-sharp duplicati-latest gtk-sharp-2 mono-msbuild nuget nunit3-console
Optional For : rider
Conflicts With : monodoc
Replaces : None
Installed Size : 251.15 MiB
Packager : Giancarlo Razzolini <grazzolini@archlinux.org>
Build Date : Thu 17 Jun 2021 10:36:55 AM PDT
Install Date : Sat 19 Jun 2021 10:26:39 AM PDT
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
$ pacman -Qi mono-msbuild
Name : mono-msbuild
Version : 16.10.1.xamarinxplat.2021.05.26.14.00-1
Description : Xamarin implementation of the Microsoft build system
Architecture : x86_64
URL : https://github.com/mono/linux-packaging-msbuild
Licenses : MIT
Groups : None
Provides : msbuild
Depends On : mono
Optional Deps : None
Required By : None
Optional For : rider
Conflicts With : msbuild
Replaces : None
Installed Size : 44.41 MiB
Packager : Maxime Gauduin <alucryd@archlinux.org>
Build Date : Thu 17 Jun 2021 12:49:55 PM PDT
Install Date : Mon 21 Jun 2021 11:31:05 AM PDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
$ pacman -Qi dotnet-sdk
Name : dotnet-sdk
Version : 5.0.7.sdk204-1
Description : The .NET Core SDK
Architecture : x86_64
URL : https://www.microsoft.com/net/core
Licenses : MIT
Groups : None
Provides : dotnet-sdk-5.0
Depends On : dotnet-runtime dotnet-targeting-pack glibc gcc-libs netstandard-targeting-pack
Optional Deps : aspnet-targeting-pack: Build ASP.NET Core applications
Required By : None
Optional For : None
Conflicts With : dotnet-sdk-5.0
Replaces : None
Installed Size : 173.84 MiB
Packager : Maxime Gauduin <alucryd@archlinux.org>
Build Date : Thu 10 Jun 2021 01:56:33 PM PDT
Install Date : Sat 12 Jun 2021 08:57:43 AM PDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
$ for F in $(find /usr/lib/mono -name System.Reflection.Metadata.dll -type f) ; do echo $F ; monodis --assembly $F | grep Version ; done
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk.Razor/tasks/net46/System.Reflection.Metadata.dll
Version: 1.4.5.0
/usr/lib/mono/msbuild/Current/bin/Sdks/ILLink.Tasks/tools/net472/System.Reflection.Metadata.dll
Version: 1.4.2.0
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/tools/net472/System.Reflection.Metadata.dll
Version: 1.4.2.0
/usr/lib/mono/4.5/System.Reflection.Metadata.dll
Version: 1.4.3.0
https://github.com/mono/roslyn-binaries/commit/1c6482470cd219dcc7503259a20f26a1723f20ec
The updated rosalyn binaries were picked up in the mono package here:
https://github.com/mono/mono/commit/20e5b164e7fe446ab58487eb2237652a53aefd37
It seems that some mono package dependencies were likely out of sync. It's possible that an updated version of mono will fix this issue. The following comment seems to indicate so:
https://github.com/KSP-CKAN/CKAN/issues/3361#issuecomment-847426156
$ monodis --assembly System.Reflection.Metadata.dll
Assembly Table
Name: System.Reflection.Metadata
Hash Algoritm: 0x00008004
Version: 1.4.3.0
Flags: 0x00000001
PublicKey: BlobPtr (0x00002abb)
Dump:
0x00000000: 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00
0x00000010: 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00
0x00000020: 07 D1 FA 57 C4 AE D9 F0 A3 2E 84 AA 0F AE FD 0D
0x00000030: E9 E8 FD 6A EC 8F 87 FB 03 76 6C 83 4C 99 92 1E
0x00000040: B2 3B E7 9A D9 D5 DC C1 DD 9A D2 36 13 21 02 90
0x00000050: 0B 72 3C F9 80 95 7F C4 E1 77 10 8F C6 07 77 4F
0x00000060: 29 E8 32 0E 92 EA 05 EC E4 E8 21 C0 A5 EF E8 F1
0x00000070: 64 5C 4C 0C 93 C1 AB 99 28 5D 62 2C AA 65 2C 1D
0x00000080: FA D6 3D 74 5D 6F 2D E5 F1 7E 5E AF 0F C4 96 3D
0x00000090: 26 1C 8A 12 43 65 18 20 6D C0 93 34 4D 5A D2 93
Culture:
The version of System.Reflection.Metadata from rosalyn 3.9.0 (updated in https://github.com/mono/roslyn-binaries/commit/1c6482470cd219dcc7503259a20f26a1723f20ec):
$ monodis --assembly System.Reflection.Metadata.dll
Assembly Table
Name: System.Reflection.Metadata
Hash Algoritm: 0x00008004
Version: 5.0.0.0
Flags: 0x00000001
PublicKey: BlobPtr (0x00002b18)
Dump:
0x00000000: 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00
0x00000010: 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00
0x00000020: 07 D1 FA 57 C4 AE D9 F0 A3 2E 84 AA 0F AE FD 0D
0x00000030: E9 E8 FD 6A EC 8F 87 FB 03 76 6C 83 4C 99 92 1E
0x00000040: B2 3B E7 9A D9 D5 DC C1 DD 9A D2 36 13 21 02 90
0x00000050: 0B 72 3C F9 80 95 7F C4 E1 77 10 8F C6 07 77 4F
0x00000060: 29 E8 32 0E 92 EA 05 EC E4 E8 21 C0 A5 EF E8 F1
0x00000070: 64 5C 4C 0C 93 C1 AB 99 28 5D 62 2C AA 65 2C 1D
0x00000080: FA D6 3D 74 5D 6F 2D E5 F1 7E 5E AF 0F C4 96 3D
0x00000090: 26 1C 8A 12 43 65 18 20 6D C0 93 34 4D 5A D2 93
Culture:
I have installed dotnet-host-bin and dotnet-sdk-bin from AUR, which provides host-5.0, sdk-5.0, runtime-5.0, etc.
mono and msbuild are *not* installed with the dotnet packages.
Installing mono-msbuild and mono-msbuild-sdkresolver from the Community repository, I encounter the same problem as reported above.
I am currently using their workaround (https://github.com/KSP-CKAN/CKAN/issues/3361) which extracts the System.Reflection.Metadata.dll from the debian mono-msbuild package (https://www.mono-project.com/download/preview/) and copies it to /usr/lib/mono/4.5/
mono 6.12.0.122
msbuild 16.10.1.xamarinxplat.2021.05.26.14.00
dotnet sdk 6.0.0.sdk100
nuget 5.10.0
https://github.com/cobbr/SharpSploit/issues/76 & https://github.com/tevora-threat/SharpView/issues/8