Fix .NET files deploy regression on AOT platforms

This commit is contained in:
Wojtek Figat
2025-03-10 18:46:15 +01:00
parent 52c09b95ca
commit 48343897cd

View File

@@ -214,10 +214,18 @@ bool DeployDataStep::Perform(CookingData& data)
FileSystem::NormalizePath(srcDotnet);
LOG(Info, "Using .NET Runtime {} at {}", TEXT("Host"), srcDotnet);
// Get major Version
// Get .NET runtime version
String version;
if (usAOT)
{
// Precompiled
version = StringUtils::ToString(GAME_BUILD_DOTNET_RUNTIME_MIN_VER);
}
else
{
// Detect from path
Array<String> pathParts;
srcDotnet.Split('/', pathParts);
String version;
for (int i = 0; i < pathParts.Count(); i++)
{
if (pathParts[i] == TEXT("runtimes"))
@@ -234,12 +242,12 @@ bool DeployDataStep::Perform(CookingData& data)
}
}
}
if (version.IsEmpty())
{
data.Error(TEXT("Failed to find supported .NET version for the current host platform."));
return true;
}
}
// Deploy runtime files
const Char* corlibPrivateName = TEXT("System.Private.CoreLib.dll");