Skip to content

dotnet-compile-fsc depends on deprecated API in System.Reflection.Metadata #6416

@TheRealPiotrP

Description

@TheRealPiotrP

In bringing the CLI onto stable versions of the we have run into an issue with Fsharp loading a type in System.Reflection.Metadata.

It looks like the type was renamed here:
dotnet/corefx@a9442a6

More specifically, that type isn’t even public in MetadataReader 1.3.0. Looks like FSharp is using the 1.4.0 API of the package and just hit a breaking change made in the API. https://github.com/fsharp/fsharp/blob/25890f73b7491719a77c2f0014ad9960fca3283e/src/absil/ilwritepdb.fs#L361

Fix here is to get FSharp updated to the latest 1.4.0-rc4* package (knowing it won’t be going stable) and update their source. If you need to ship a stable FSharp right now then this code will have to be removed.

Is this something that has been seen or dealt with in Fsharp yet?

We’re only seeing this error on Windows, any ideas why that might be the case?

The actual error:
FS0193: internal error: Could not load type 'System.Reflection.PortableExecutable.ContentId' from assembly 'System.Reflection.Metadata, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions