Unable to build project on Windows 10 (UE5)


Sorry, this may be my fault, since I’m new to unreal; but I haven’t been able to build a project for some reason.

This is the section of the log where the failure occurs. I’ll also note that I can build cpp projects correctly from the editor using live code, or from Rider/VS Code/VS 2022. It’s just building the entire project onto windows as a standalone executable which seems to not work
Also the

********** BUILD COMMAND STARTED **********
************************* UnrealBuild:
************************* UseXGE: False
************************* UseParallelExecutor: False
SafeFileExists B:\UnrealEngine\UE5\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe=True
SafeDeleteFile B:\UnrealEngine5_Projects\Udemy\MultiplayerCpp\Intermediate\Build\Manifest.xml
SafeFileExists B:\UnrealEngine\UE5\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe=True
Running: B:\UnrealEngine\UE5\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe MultiplayerCpp Win64 Development -Project=B:\UnrealEngine5_Projects\Udemy\MultiplayerCpp\MultiplayerCpp.uproject  B:\UnrealEngine5_Projects\Udemy\MultiplayerCpp\MultiplayerCpp.uproject -NoUBTMakefiles  -remoteini="B:\UnrealEngine5_Projects\Udemy\MultiplayerCpp" -skipdeploy -Manifest=B:\UnrealEngine5_Projects\Udemy\MultiplayerCpp\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\Max's Boss PC\AppData\Roaming\Unreal Engine\AutomationTool\Logs\B+UnrealEngine+UE5+UE_5.0\UBT-MultiplayerCpp-Win64-Development.txt"
Log file: C:\Users\Maxs
ERROR: Unhandled exception: System.Exception: Error while creating log file "C:\Users\Maxs"
        ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\Maxs' is denied.

The path “C:\Users\Maxs” does not exist, it should be “C:\Max’s Boss PC”. I named it 5 years ago btw :smile:

Any help would be appreciated greatly

I’m guessing it’s because there’s an apostrophe in the path name.

hi @TyrannicGoat1
The rules for project path names are NO SPACES, the only symbol allowed is the minus sign and in later versions the underscore. The space terminates all windows 10 path names C:\Program Files (x86) \ needs quotes round or it becomes C:\Program
Its not Unreal it’s Windows 10 and if you come from #windows 7 it can be a change. Yet another this is the total path must be less than 25 characters not 255 as the documentation states, Windows 7 restriction
C:\User\owner\Documents\Unreal is the standard for projects if you don’t use the standards programs like Quixel break

Thank you for the answers. Yes I thought that might be the issue. However the name of username folder cannot be changed in Windows 10. I even changed the username in accounts, but the user folder which is used in the path variable still shows up as Max’s Boss PC. Also just for reference, the version of windows I installed gave me the name Max’s PC as the username (a long time ago). I cannot change that directory name. Is it really impossible for me to build because my local windows account has an apostrophe in it? That seems like a bug. Should I submit a bug report?

EDIT [SOLUTION]: Ok so there is a workaround. I created another local windows account, switched to that user and now I can package successfully.

As far as I understand it, it’s a “known limitation” more than a “bug.”
I recommend creating a folder C:\UEProjects which you can have your projects in.
Or, even better, add a drive, and make it D:\UEProjects so you have some room to grow :slight_smile:
Keeping the Unreal projects in a different file tree entirely makes it easier to set up sane backup rules (don’t back up intermediate/built/cached files,) for example, as well as antivirus exceptions if you have to deal with those to get good performance.

No the location of the project doesn’t appear to make a difference. My UE project and even Unreal Engine itself is not on my system drive (C:/) they are both on my B:/ drive. I generally try to avoid using my system drive for anything important. the problem was that it still uses the path variable in windows. Unfortunately the path variable %USERNAME%/ is used commonly by applications on windows platform to make log files or temp files or whatever virtual space the software needs to work. When you create a local account on windows, that’s when windows creates the directory and initializes this path variable. You can change the account name later in windows account management, however the path variable and the directory will not be updated. That directory path appears to be permanently fixed. If you try to change it from file explorer (right click and rename) the rename option is missing from the menu.

The only viable option is to create a new local admin account and for god’s sake don’t put an apostrophe in the username. :laughing:

1 Like

Good advice :slight_smile: