diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 7ab2ee9937..3043880a93 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -1321,6 +1321,17 @@ + + + + + + + + <_GenerateBindingsDependsOn> _ComputeBindingVariables; diff --git a/runtime/coreclr-bridge.m b/runtime/coreclr-bridge.m index ba7ec923e6..97a634721a 100644 --- a/runtime/coreclr-bridge.m +++ b/runtime/coreclr-bridge.m @@ -558,9 +558,11 @@ xamarin_bridge_call_runtime_initialize (struct InitializationOptions* options, G void xamarin_bridge_register_product_assembly (GCHandle* exception_gchandle) { +#if !defined (NATIVEAOT) MonoAssembly *assembly; assembly = xamarin_open_and_register (PRODUCT_DUAL_ASSEMBLY, exception_gchandle); xamarin_mono_object_release (&assembly); +#endif // !defined (NATIVEAOT) } MonoMethod * diff --git a/runtime/monotouch-main.m b/runtime/monotouch-main.m index c2f8cc0ed3..18453b74bf 100644 --- a/runtime/monotouch-main.m +++ b/runtime/monotouch-main.m @@ -441,6 +441,7 @@ xamarin_main (int argc, char *argv[], enum XamarinLaunchMode launch_mode) if (xamarin_register_assemblies != NULL) xamarin_register_assemblies (); +#if !defined (NATIVEAOT) if (xamarin_executable_name) { assembly = xamarin_open_and_register (xamarin_executable_name, &exception_gchandle); xamarin_process_fatal_exception_gchandle (exception_gchandle, "An exception occurred while opening the main executable"); @@ -454,14 +455,16 @@ xamarin_main (int argc, char *argv[], enum XamarinLaunchMode launch_mode) xamarin_process_fatal_exception_gchandle (exception_gchandle, "An exception occurred while opening an assembly"); } -#if SUPPORTS_DYNAMIC_REGISTRATION if (xamarin_supports_dynamic_registration) { MonoReflectionAssembly *rassembly = mono_assembly_get_object (mono_domain_get (), assembly); xamarin_register_entry_assembly (rassembly, &exception_gchandle); xamarin_mono_object_release (&rassembly); xamarin_process_fatal_exception_gchandle (exception_gchandle, "An exception occurred while opening the entry assembly"); } -#endif // SUPPORTS_DYNAMIC_REGISTRATION +#else + assembly = NULL; + (void)exception_gchandle; +#endif // !defined (NATIVEAOT) DEBUG_LAUNCH_TIME_PRINT ("\tAssembly register time");