Fix loading C# assemblies from Mono AOT output

This commit is contained in:
Wojtek Figat
2023-03-31 18:31:25 +02:00
parent 7bec45dacf
commit e562a7d72c
3 changed files with 25 additions and 3 deletions

View File

@@ -761,6 +761,16 @@ MClass::MClass(const MAssembly* parentAssembly, void* handle, const char* name,
classHandles.Add(handle, this);
}
bool MAssembly::ResolveMissingFile(String& assemblyPath) const
{
#if DOTNET_HOST_MONO
// Fallback to AOT-ed assembly location
assemblyPath = Globals::BinariesFolder / TEXT("Dotnet") / StringUtils::GetFileName(assemblyPath);
return !FileSystem::FileExists(assemblyPath);
#endif
return true;
}
MClass::~MClass()
{
_methods.ClearDelete();