Xabe.FFmpeg icon indicating copy to clipboard operation
Xabe.FFmpeg copied to clipboard

Receiving 'Missing system type and architecture.' exception on Android in VS 2022 Emulator

Open acasciani opened this issue 1 year ago • 1 comments

Hello! In my code I have the following call: await FFmpegDownloader.GetLatestVersion(FFmpegVersion.Android);

This throws an System.InvalidOperationException: 'Missing system type and architecture.' in the Pixel 5, Android 11.0 API 30 Visual Studio 2022 emulator and using .NET 8. I pulled the Xabe.FFmpeg.Downloader code locally and loaded side by side by code. The exception is happening here: https://github.com/tomaszzmuda/Xabe.FFmpeg/blob/7af0345089bec7a6c5ecdcb339dd6e01e36b96cd/src/Xabe.FFmpeg.Downloader/OperatinSystemProvider/OperatingSystemProvider.cs#L54C15-L54C15

Each of the following will return false within this emulator.

RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
RuntimeInformation.IsOSPlatform(OSPlatform.Linux)

Per this .net core documentation (https://github.com/dotnet/runtime/issues/51052#issuecomment-861729857) it does not look like this is the preferred way to check for Android.

Is this a bug in the OperatingSystemProvider.cs implementation for Android, or is there a different way we should go about using await FFmpegDownloader.GetLatestVersion(FFmpegVersion.Android); with Android?

Thank you!

acasciani avatar Jan 06 '24 20:01 acasciani

i have the same problem

juepiezhongren avatar Apr 03 '24 07:04 juepiezhongren