Error MSB3021 Access to the path 'EpicGames.Core.dll' is denied.

Share some temporary solutions for building in my case. Some may be suck but at least you can process with your work if not gonna touch the engine source.

  1. Try to build all project one by one manually instead of building the whole solution if your repository is new and clear.
  2. If you insist to build the whole solution. Build all C# Project or some important C# project(such as UnrealBuildTool and EpicGames.Build) first, then you can try to build the whole solution.
  3. If got error MSB3021 during building solution. Try to delete the .dll files motioned in Build Output panel. For example, we have Unable to copy file "UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Build\bin\Development\net6.0\EpicGames.Build.dll" to "..\..\..\Binaries\DotNET\UnrealBuildTool\EpicGames.Build.dll".
    Remove UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool\EpicGames.Build.dll and try again.
    Try not to clean solution if your build is fine.

I think it’s not a system security policy.
In my case, those abnormal .dll files generation may be caused by the multi-threading. Just like I unable to compile C++ project with the source version of UE 5.1. I guess threads are seizing the same resource and ruin the .dll. Will need more investigation.

1 Like