PlatformNotSupported MacOS
See original GitHub issueDescribe the bug
We’ve decided to update MacOS + Xamarin + XCode to the latest stable versions. That made us update your library from 2.2.5 to 2.5.1 (latest currently). The cli started to throw exception System.PlatformNotSupportedException: Operation is not supported on this platform
.
To Reproduce Steps to reproduce the behavior:
var cli = new CommandLineApplication();
cli.Execute(emptyArgs);
Expected behavior Work as usual.
Additional context Full stacktrace:
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Console.remove_CancelKeyPress (System.ConsoleCancelEventHandler value) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/corlib/System/Console.cs:947
at McMaster.Extensions.CommandLineUtils.PhysicalConsole.remove_CancelKeyPress (System.ConsoleCancelEventHandler value) [0x00000] in <7f833d3ed5424320a314ef2658925b83>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync (System.String[] args, System.Threading.CancellationToken cancellationToken) [0x00137] in <7f833d3ed5424320a314ef2658925b83>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00016] in <7f833d3ed5424320a314ef2658925b83>:0
at Launcher.MainClass.Main (System.String[] args) [0x00144] in /Users/gameforest/Desktop/Citrus/Orange/Launcher/Main.cs:388
Full info about system:
=== Visual Studio Community 2019 for Mac ===
Version 8.4.5 (build 19)
Installation UUID: 877191a5-d7c4-4943-99dc-315c0d7d6560
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.16.1.25 (issue-7441-d16-3-vsmac / 881172e73)
Package version: 606000155
=== Mono Framework MDK ===
Runtime:
Mono 6.6.0.155 (2019-08/296a9afdb24) (64-bit)
Package version: 606000155
=== Roslyn (Language Service) ===
3.4.0-beta4-19562-05+ff930dec4565e2bc424ad3bf3e22ecb20542c87d
=== NuGet ===
Version: 5.3.0.6192
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/3.1.101/Sdks
SDK Versions:
3.1.101
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks
=== .NET Core Runtime ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.1
2.1.15
2.0.0
=== Xamarin.Profiler ===
Version: 1.6.13.11
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 10.1.3.7 (Visual Studio Community)
Commit: xamarin-android/d16-4/d66aed0
Android SDK: /Users/gameforest/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.4
SDK Build Tools Version: 28.0.3
Build Information:
Mono: fd9f379
Java.Interop: xamarin/java.interop/d16-4@c4e569f
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.28.0@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@9f4ed4b
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/gameforest/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android SDK Manager ===
Version: 16.4.0.10
Hash: 2c49a7d
Branch: remotes/origin/d16-4
Build date: 2020-01-30 10:22:44 UTC
=== Android Device Manager ===
Version: 16.4.0.30
Hash: f9172e2
Branch: remotes/origin/d16-4
Build date: 2020-01-30 10:23:04 UTC
=== Xamarin Designer ===
Version: 16.4.0.479
Hash: 074544417
Branch: remotes/origin/d16-4
Build date: 2020-01-22 22:50:22 UTC
=== Apple Developer Tools ===
Xcode 11.3.1 (15715)
Build 11C504
=== Xamarin.Mac ===
Version: 6.10.0.17 (Visual Studio Community)
Hash: 5f802ef53
Branch: xcode11.3
Build date: 2020-01-07 11:53:06-0500
=== Xamarin.iOS ===
Version: 13.10.0.17 (Visual Studio Community)
Hash: 5f802ef53
Branch: xcode11.3
Build date: 2020-01-07 11:53:06-0500
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 804050019
Git revision: 5b9e12b8142016693a4b0f0bdac84ffac1d84c28
Build date: 2020-02-07 12:51:25+00
Build branch: release-8.4
Xamarin extensions: 5b9e12b8142016693a4b0f0bdac84ffac1d84c28
=== Operating System ===
Mac OS X 10.15.3
Darwin 19.3.0 Darwin Kernel Version 19.3.0
Thu Jan 9 20:58:23 PST 2020
root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
This version of Mac OS X is not supported on this platform!
This version of Mac OS X is not supported on this platform! How do i fix this? in the guide i followed the...
Read more >This Version of Mac os x is not supported on this platform
No, the SMBIOS that you are using is incompatible with the OS version that you have installed.
Read more >Troubleshooting | OpenCore Legacy Patcher
Stuck on This version of Mac OS X is not supported on this platform or ( ) Prohibited Symbol; Cannot boot macOS...
Read more >This version of Mac OS X is not supported on this platform
This version of Mac OS X is not supported on this platform! Reason: Z87-HD3. My machine setup is: Gigabyte Z87-HD3 Intel i5 -...
Read more >macOS Ventura (macOS 13) - Cradle Support
1, you will not automatically receive an update prompt within Cradle Hub and will likely see a "Platform not supported" or "Not authorised...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Are you able to keep using 2.2.5 until we can fix this? Seems like a simple fix would be to suppress this exception around this line: https://github.com/natemcmaster/CommandLineUtils/blob/fa06ab9b41b390fc7d1e6e0a9783a1b3882f1bb9/src/CommandLineUtils/CommandLineApplication.cs#L917-L920
Also (rhetorical question), why in the world does Xamarin allow adding an event handler to ConsoleKeyPress, but not removing that same handler?
Perhaps I was mistaken. Can’t reproduce it now. Thank you for your workaround 😃