Мой код:
Код: Выделить всё
mono_set_assemblies_path("../lib/mono");
MonoDomain* rootDomain = mono_jit_init("TestRuntime");
if (rootDomain == nullptr) {
throw("Failed to initialize Mono");
return 0;
}
// Create a new app domain
// @param domainName: Name of the domain
// @param configFile: Config file to use
char domainName[] = "TestRuntime";
MonoDomain* appDomain = mono_domain_create_appdomain(domainName, nullptr);
// Set the app domain as the active domain
// @param domain: The domain to set as active
// @param force: If true, the domain is set as the active domain even if it is not the root domain
mono_domain_set(appDomain, true);
//////MonoAssembly* CoreAssembly = loadCSharpAssembly("../Extern/Scripts/ScriptCore.dll");
//////MonoImage* assemblyImage = mono_assembly_get_image(CoreAssembly);
mono_domain_set(mono_get_root_domain(), false);
mono_domain_unload(appDomain);
appDomain = nullptr;
mono_jit_cleanup(rootDomain);
rootDomain = nullptr;
Подробнее здесь: https://stackoverflow.com/questions/791 ... -c-project
Мобильная версия