I'm trying to use the following instructions to embed the Mono runtime in a C++ program.

To initialize the runtime, you have to call mono_jit_init with an input parameter called file_name. They say that file_name is the name of the main assembly file. - What do they mean by "main assembly file?" Is this the name of a C# app that I want to have running?

A little farther down, they describe opening the assembly and executing it via the call mono_domain_assembly_open. This function takes a file name as an input parameter as well and I'm confused as to what this file should be as well. Should it be the same as the previous one?

Any help is appreciated. Thanks,



mono_jit_init() takes a filename that is used to set the domain name (from the name of the file, excluding the directory), the docs are a bit outdated, I'll correct them. The framework version used will be the default one, which depends on the mono version.

If you need to initialize a specific framework version (2.0 or 4.0) you can use mono_jit_init_version() instead.

Thanks for the reply. Okay, so the filename is used to set the domain name. Is that all the filename is used for? Does the file have to even exist?
Consider it a domain name, it doesn't have to exist.
f you use that API, the usual thing is to pass the same filename as the main assembly you later execute, but it is not a requirement.