[Runtime] Skip code to verify the Mono version in .NET for Xamarin.Mac. (#13020)
1. We're not using Mono for macOS in .NET. 2. Even if we were, we're not using a system mono anymore, which means we can't run into unexpected mono versions at runtime.
This commit is contained in:
Родитель
fc26c72b2a
Коммит
7b74a82724
|
@ -110,14 +110,17 @@ namespace ObjCRuntime {
|
|||
if (initialized)
|
||||
return;
|
||||
|
||||
#if !NET
|
||||
if (GC.MaxGeneration <= 0)
|
||||
throw ErrorHelper.CreateError (8017, "The Boehm garbage collector is not supported. Please use SGen instead.");
|
||||
|
||||
VerifyMonoVersion ();
|
||||
#endif
|
||||
|
||||
LookupInternalFunction<initialize_func> ("xamarin_initialize") ();
|
||||
}
|
||||
|
||||
#if !NET
|
||||
static void VerifyMonoVersion ()
|
||||
{
|
||||
// Verify that the system mono we're running against is of a supported version.
|
||||
|
@ -150,6 +153,7 @@ namespace ObjCRuntime {
|
|||
|
||||
throw new NotSupportedException ($"This version of Xamarin.Mac requires Mono {required_version}, but found Mono {actual_version}.");
|
||||
}
|
||||
#endif
|
||||
|
||||
unsafe static void InitializePlatform (InitializationOptions* options)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче