DLC patch Build Error

Hello there @Vaibhav_Mahajan!

Investigating through your log, the main conflict seems to be in this call:

SafeCopyFile Exception was Exception in System.Private.CoreLib: The process cannot access the file ‘D:\SagarBackup\UpdateProjectNew\Plugins\DLC1.0\Saved\StagedBuilds\Android_ETC2\UpdateProject\Plugins\DLC1.0\Content\Paks\Android_ETC2\DLC1.0UpdateProject-Android_ETC2.ucas’ because it is being used by another process.

This means that UE is trying to access this DLC file, while something else in your system is occupating it, which could be Windows itself, or a security process from your antivirus, or OneDrive sync (as part of your project is in the OneDrive folder). We need to make sure that the file is available during the process. Let’s check a few availabe options for this:

  • Avoid using the OneDrive folder during the process, via changing your “-chunkinstalldirectory” to a local path outside of it.

  • Clear your current cache by delete the contents of folders StagedBuilds and DLC1.0, to ensure no old or locked files are present during the process.

  • Execute your build with administrator privileges to prevent access right problems.

  • For testing purposes, disable your antivirus, as it could be locking files. If this turns out to be the solution, add exceptions for your Unreal Engine project, engine, and build output directories, then re-enable your security.

  • If the issue persists, use tools like “Process Explorer” or “LockHunter” after any build, to try to pinpoint the process taking over the .ucas file.