saleem-mirza / serilog-sinks-sqlite

A Serilog sink that writes to SQLite
Apache License 2.0
56 stars 44 forks source link

MAUI build fails: PE image does not have metadata #41

Open Ghostbird opened 1 year ago

Ghostbird commented 1 year ago

It seems the way this library is packaged makes it unusable with MAUI when building on Linux (Docker). The error given is:

XAPRAS7009: System.InvalidOperationException: PE image does not have metadata. [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]
XAPRAS7009:    at System.Reflection.PortableExecutable.PEReader.GetMetadataBlock() [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]
XAPRAS7009:    at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]
XAPRAS7009:    at Xamarin.Android.Tasks.ProcessAssemblies.DeduplicateAssemblies(List`1 output, Dictionary`2 symbols) [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]
XAPRAS7009:    at Xamarin.Android.Tasks.ProcessAssemblies.RunTask() [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]
XAPRAS7009:    at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /mnt/vss/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17 [/workspace/temp/temp.csproj::TargetFramework=net7.0-android]

This is similar to the problem mentioned here