Trying to get msvc and ue5 working...

I cannot get ue5 and msvc to work correctly. Blank project. Added no code. Won’t compile. I’m about to give up. I’ve already tried reinstalling and pretty much every solution I’ve come across. It seems unreal is not generating all of the necessary files. I probably did something / missed something stupid in setting everything up. Please help.

The command ““C:\Program Files\Epic Games\UE_5.5\Engine\Build\BatchFiles\Build.bat” MyProjectEditor Win64 Development -Project=“C:\Users\pheon\Documents\Unreal Projects\MyProject\MyProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 -WorkingDir=C:\Users\pheon\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles -Files=....\Source\MyProject\Public\MyActor.h” exited with code 8.

Hello there @Pheonex723!

From what I could gather around the community, the code 8 error you are receiving points to a compilation error, but since you are working from a blank project, it means the issue is coming from the base setup, either Unreal Engine or Visual Studio.

The guide below covers the full setup between UE and VS, please review it and make sure that all components and their version are properly installed in your system:

After making the changes, re-generate your project files from the .uproject file. As well, clean the contents from Binaries and Intermediate folders, so there’s no old cache causing problems. Hope this helps!

Thank you for the reply. I’ve already followed all steps outlined, and again after fresh installs, and still get the same error. Hence why I turned here. I was banking on something obvious, not outlined, that I missed.

I’ve just reverified everything, started new project with one blueprint object in scene, blank c++ class, same error. When I try to reload in ue5 I get a built with different engine error but it won’t recompile. I’m completely at a loss.

ue5.5.4 msvc 2022 v17.14.2 with all the recommended libraries added on. I’m about to just forget about it and find another new hobby.

how are you trying to compile?

what version of ue5 and msvc you have?

can you share the compile logs?

if it has no source what are you trying to compile?

ue5.5.4 msvc v17.14.2
I started working through some tutorials a few weeks ago, blueprint based starting, then add some c++ stuff. It seemed to be working but when I went to reopen it got a built in another engine version error but didn’t change engines. It failed to compile and wouldn’t open in ue. I opened the c++ part in visual, it opened but wouldn’t compile, yes with ue closed, same error. Tried all the suggestions from google, delete binaries etc, nothing worked. Unistalled both ue and msvc, started over, figured why add anything if I’m not setting it up correctly so tried with just an empty project. Same error.

I’m currently reinstalling msvc again, only logs it saved were the version select logs, I don’t think that’s what you’re asking for, and being a new user I can’t upload anything. The output had more errors than the error log. From what I can tell it seems that myactor.generat.h isn’t being generated by ue and the compiler can’t access the myactor header. I don’t understand why a header needs to access itself. My c++ is really rusty.

As far as I know, if I let ue create a basic actor script, it should compile. If I’m wrong then I got me a Id10T error. My best guess was I was missing some setting somewhere.

ok it might be that you are just new to ue and getting confused.

i was asking for the compilation logs from msvc.

oh, i wasn’t aware of that. even a screenshot would help.
otherwise copy some erros from the log and past them here.

that’s a ue thing. it creates extra headers.

maybe you just need to regenerate the project.

  • close everything.
  • delete binaries, intermediat, and saved.
  • right click the uproject file and click “regenerate project”

that should create all things.
you can then open the sln with visual studio and try launching your app.

you need to make sure the correct target is selected “development game” for your app and not other tool.

i don’t use vs sorry.

if you still get errors of a missing header then check if the name is correct. also i’ve heard that if you create a class some of the soft (i think ue), and it’s on a subdirectory, it adds the subdirectory to the path and then msvc doesn’t find it.

Build started at 8:38 PM…
1>------ Build started: Project: MyProject, Configuration: DebugGame_Editor x64 ------
1>Using bundled DotNet SDK version: 8.0.300
1>Running UnrealBuildTool: dotnet “....\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” MyProjectEditor Win64 DebugGame -Project=“C:\Users\pheon\Documents\Unreal Projects\MyProject\MyProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 -WorkingDir=C:\Users\pheon\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles -Files=....\Source\MyProject\Public\MyActor.h
1>Log file: C:\Users\pheon\AppData\Local\UnrealBuildTool\Log.txt
1>Creating makefile for MyProjectEditor (no existing makefile)
1>Parsing headers for MyProjectEditor
1> Running Internal UnrealHeaderTool “C:\Users\pheon\Documents\Unreal Projects\MyProject\MyProject.uproject” “C:\Users\pheon\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\DebugGame\MyProjectEditor.uhtmanifest” -WarningsAsErrors -installed
1>Total of 0 written
1>Reflection code generated for MyProjectEditor in 5.4632238 seconds
1>Creating makefile for Projects\MyProject\Intermediate\ProjectFiles (no existing makefile)
1>Total execution time: 11.42 seconds
1>Couldn’t find target rules file for target ‘Projects\MyProject\Intermediate\ProjectFiles’ in rules assembly ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’
1>
1>Location: C:\Program Files\Epic Games\UE_5.5\Engine\Intermediate\Build\BuildRules\UE5Rules.dll
1>
1>
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(70,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE_5.5\Engine\Build\BatchFiles\Build.bat” MyProjectEditor Win64 DebugGame -Project=“C:\Users\pheon\Documents\Unreal Projects\MyProject\MyProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 -WorkingDir=C:\Users\pheon\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles -Files=....\Source\MyProject\Public\MyActor.h” exited with code 8.
1>Done building project “MyProject.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 8:38 PM and took 13.131 seconds ==========

After reinstalling both programs and trying again, same error. I’ve posted the output from msvc but noticed a log file in line 5. It mentions no config file, reading from appdata/roaming/… That file only lists a web address that pops a 404 error if I try going to it. Is this where my problem is coming from and how do I fix it? Or is it something else? No actual log file saved anywhere from msvc as far as I can tell.

the log seems relatively ok.

what about this log?

i wonder if this is the problem

you should have a file named Source/MyProject.Target.cs
and Source/MyProjectEditor.Target.cs
and they should have a class named
MyProjectTarget: TargetRules

and MyProjectEditorTarget: TargetRules respectively

Log started at 05/27/2025 20:38:42 (2025-05-28T00:38:42Z)
No config file at C:\ProgramData\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
No config file at C:\Users\pheon\AppData\Local\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
No config file at C:\Users\pheon\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Configuration will be read from:
C:\Users\pheon\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Setting temp directory to ‘C:\Users\pheon\AppData\Local\Temp\UnrealBuildTool\f2d894e7’
Registering build platform: UnrealBuildTool.AndroidPlatformFactory
Registering build platform: UnrealBuildTool.IOSPlatformFactory
Registering build platform: UnrealBuildTool.LinuxPlatformFactory
Registering build platform: UnrealBuildTool.MacPlatformFactory
Registering build platform: UnrealBuildTool.TVOSPlatformFactory
Registering build platform: UnrealBuildTool.WindowsPlatformFactory
Found Windows 10 SDK root at C:\Program Files (x86)\Windows Kits\10 (1)
Found Windows 10 SDK root at C:\Program Files (x86)\Windows Kits\10 (2)
Found Windows 10 SDK version 10.0.22621.0 at C:\Program Files (x86)\Windows Kits\10
Found Universal CRT version 10.0.22621.0 at C:\Program Files (x86)\Windows Kits\10
Found Windows 10 SDK version 10.0.26100.0 at C:\Program Files (x86)\Windows Kits\10
Found Universal CRT version 10.0.26100.0 at C:\Program Files (x86)\Windows Kits\10
Win64 Installed SDK(s): MinVersion_Sdk=10.0.19041.0, MaxVersion_Sdk=10.9.99999.0, CurrentVersion_Sdk=10.0.22621.0, Version_AutoSdk=10.0.22621.0, CurrentVersion_AutoSdk=
Registering build platform: Win64 - buildable: True
Registering build platform: UnrealBuildTool.VisionOSPlatformFactory
Command line: “C:\Program Files\Epic Games\UE_5.5\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” MyProjectEditor Win64 DebugGame “-Project=C:\Users\pheon\Documents\Unreal Projects\MyProject\MyProject.uproject” -WaitMutex -FromMsBuild -architecture=x64 “-file=C:\Users\pheon\Documents\Unreal Projects\MyProject\Source\MyProject\Public\MyActor.h” -nooutput -skipbuild
Log file: C:\Users\pheon\AppData\Local\UnrealBuildTool\Log.txt
Deleting old log file: C:\Users\pheon\AppData\Local\UnrealBuildTool\Log-backup-2025.05.19-13.22.27.txt

Generated code is up to date.
Total execution time: 2.01 seconds
WriteFileIfChanged() wrote 0 changed files of 0 requested writes.
Timeline:

[ 0.000]
0.000
[ 2.011]

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class MyProjectTarget : TargetRules
{
public MyProjectTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V5;

	ExtraModuleNames.AddRange( new string[] { "MyProject" } );
}

}

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class MyProjectEditorTarget : TargetRules
{
public MyProjectEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V5;

	ExtraModuleNames.AddRange( new string[] { "MyProject" } );
}

}

that looks really good.
i can’t think what else could be the issue :confused:

Well now, it at least makes me feel better that the code generated I don’t understand yet looks normal. I was banking on something I didn’t do right in unreal that wasn’t generating something somewhere. I can not find myactor.generate.h anywhere. And after trying to do anything in msvc, if I try to load it up again in ue it says built with different engine, if I let it compile it fails, if I say no it claims the project doesn’t exist and crashes. Thank you for taking a look at least.

1 Like

there’s a still chance of that. or there could be an issue with the setup.
but you said you’ve reisntalled many times.

that’s kind of weird.
is the version on your myproject.uproject file correct? you can edit with notepad.
it might as well be using the wrong version.

not sure why it’s using a different directory. that might be part of the issue. (notice Projects vs users/…/unreal projects/myproject )

something that caused issues before is poor path parsing. and space in the path create issues.
can you COPY your project to another folder. i would advice something with a short path like “c:\w\myproject”.

btw, i don’t think ue 5.5 supports v17.14

make sure you’ve installed the right versions of the right things.
notice that it also depends on which version of vstudio you’ve installed.

btw, imho when you see “or later” it’s always a lie in software. noone can see the future and backwards compatibility is not free.

It was the space in the directory… ID10T error on my part.

Which now, I observed even more weirdness that I can’t explain before I saw your suggestion.

But first, if spaces in directories are a problem, then why is it the default path? And why only sometimes is it a problem? I would assume it either would or wouldn’t be for everyone and the developers would account for that.

I understand the “or newer” but I would assume more people would have a problem on update or new install. And being that you have to pay ms for the backwards compatibility then why is it such a recommended free ide?

Lastly, I did manage to open a project back up in ue5 and tried compiling from within the editor, it failed claiming it couldn’t find a file in visual studios directory. I modified the install removing the latest compiler and selecting an older one. It then would compile in ue5 but still the same error in msvc. I could make changes in msvc, save without compiling, and then compile in ue5. Seemed to be a workaround but the perfectionist in me screamed fix it right.

While ultimately the true problem seemed to be the space in the default directory these are just some observations with unexpected behavior, at least by my limited knowledge in the topic. All weirdness and magic to me.

Thank you so much for all the advice and help, truly appreciated.

1 Like

yeah! well done turner! i’m happy.

haha, pretty old school.
i wouldn’t blame yourself.

i don’t have the answer. that’s a good question.
i’ve encountered this issue many times. but i’ve also met devs who said that spaces didn’t cause issues to them.
i actually doubted where to suggest the space thing or not. you were lucky i was the one replying haha.
so there’s something in the tooling that is inconsistent, or maybe changes between versions. or maybe it’s not deterministic.
i’m used to have paths with no spaces because i’ve learnt long time ago, that it’s a security risk, and causes these issues very easily.

also unreal tend to create very long paths when packaging, if your path is long, it will reach the path limit easily and abort. another reason to use short paths.

yes, i said it as a recommendation only.
i’ve found myself in the spot where i needed to install the official vstudio for 5.2 but could not find the installer for vstudio because ms deleted it.

in my experience the “or newer” bite me more times than i’d like.
i think devs tend to take the “or newer” too lightly imnsho. i find it hubristic and careless.
if your code has not be tested with all “or newer” you can’t claim it’s supported.
take it as a personal opinion, not as a rule.

i don’t know anyone that recommends visual studio.
it’s a requirement. apps built for windows are relatively forced to use msvc for compatibility Vendor lock-in - Wikipedia
that kind of forces you to install vstudio.
since the people at epic want to make the guide easy, they suggest vstudio.
i guess you could install all the dependencies manually, but it could be hell. and knowing ms. i don’t think it’s even possible.

i don’t use vstudio and i hate it. i use rider. yet i had to install it to get the dependencies.

i agree. weirdness. agree with your intuition.
but unfortunately i don’t have any more ideas.
there’s something odd with your setup. and i dare to say it might be that “or newer” that has biten you too.
i’m glad you found a way to make it work. and i think you will find a solution for your issues soon.

also check rider. it’s free for non commercial uses. it might be much better exp than vstudio.

also delete intermediate, saved, binaries, and the sln and regenerate. maybe somewhere it still specifies the wrong versions.

my pleasure actually, thanks for the appreciation :slight_smile: im happy it helped :slight_smile:

Can report that after I changed the default directory to no spaces there has not been any more unexpected errors or anything to date.

1 Like