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.
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.
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.
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.
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
// 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" } );
}
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.
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”.
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.
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 im happy it helped