Remove any leftover executable files deployed from .NET SDK

This commit is contained in:
Wojtek Figat
2024-09-09 22:25:37 +02:00
parent abb684aed2
commit 05d191f491

View File

@@ -271,6 +271,17 @@ bool DeployDataStep::Perform(CookingData& data)
}
}
// Remove any leftover files copied from .NET SDK that are not needed by the engine runtime
{
Array<String> files;
FileSystem::DirectoryGetFiles(files, dstDotnet, TEXT("*.exe"));
for (const String& file : files)
{
LOG(Info, "Removing '{}'", FileSystem::ConvertAbsolutePathToRelative(dstDotnet, file));
FileSystem::DeleteFile(file);
}
}
// Optimize deployed C# class library (remove DLLs unused by scripts)
if (aotMode == DotNetAOTModes::None && buildSettings.SkipUnusedDotnetLibsPackaging)
{