Closed peterhirn closed 2 years ago
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!
Using FromPortablePdbImage
instead of FromPortablePdbStream
.
let isPortableSymbol path =
try
use provider =
File.ReadAllBytes path
|> ImmutableArray.ToImmutableArray
|> MetadataReaderProvider.FromPortablePdbImage
provider.GetMetadataReader() |> ignore
true
with
| :? System.BadImageFormatException -> false
I looked at the documentation for MetadataReaderProvider
and FromPortablePdbImage
is the method that expects an immutable array.
Please feel free to re-open this issue or another one if you still have the issue.
Thanks
Description
Using
System.Reflection.Metadata.MetadataReaderProvider
in build scripts used to work (v5.20.4
) but now fails with a strange error message (System.IO
doesn't containStream
)Repro steps
dotnet fake run
Actual behavior
Related information
Additional
Issue can be reproduced in docker
.config/dotnet-tools.json
just contains latestfake-cli
andpaket
tools.