Skip to content

The Mono.Cecil version in the Microsoft.NET.ILLink NuGet is wrong #2173

@rolfbjarne

Description

@rolfbjarne

NuGet: Microsoft.NET.ILLink v6.0.100-preview.6.21376.2.

The nuspec references Mono.Cecil 0.11.3:

$ cat /Users/rolf/.nuget/packages/microsoft.net.illink/6.0.100-preview.6.21376.2/microsoft.net.illink.nuspec | grep Mono.Cecil
        <dependency id="Mono.Cecil" version="0.11.3" exclude="Build,Analyzers" />

While the illink.dll wants Mono.Cecil 0.11.4:

 $ monodis --assemblyref /Users/rolf/.nuget/packages/microsoft.net.illink/6.0.100-preview.6.21376.2/ref/net5.0/illink.dll
AssemblyRef Table
1: Version=5.0.0.0
	Name=System.Runtime
	Flags=0x00000000
	Public Key:
0x00000000: B0 3F 5F 7F 11 D5 0A 3A 
	Zero sized hash value
2: Version=0.11.4.0
	Name=Mono.Cecil
	Flags=0x00000000
	Public Key:
0x00000000: 50 CE BF 1C CE B9 D0 5E 
	Zero sized hash value

The end result is that if I reference the Microsoft.NET.ILink package, I end up with this build problem:

CSC [dotnet] dotnet-linker.dll
CSC : error CS1705: Assembly 'illink' with identity 'illink, Version=6.0.100.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Mono.Cecil, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' which has a higher version than referenced assembly 'Mono.Cecil' with identity 'Mono.Cecil, Version=0.11.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'

because the build ends up referencing Mono.Cecil 0.11.3

Sample build log: msbuild.binlog.zip

CC @marek-safar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions