I'm following this sample/tutorial to host CoreCLR in my native app using hostfxr, I've successfully set up the runtime and got the function pointer to call into managed code.
However, in the managed application, the AppContext.BaseDirectory property is always an empty string. I tried passing the main exe path with hostfxr_initialize_parameters.host_path, still the same. Any idea how to change it?
After asking this on the dotnet discord, I figured out that some runtime properties like this can be set with
hostfxr_set_runtime_property_valueShould look like this: