ive had to reinstall windows due to some errors, but upon opening my project again and compiling im getting this error:
ive tried rebuilding visual studio project files and deleting binary, intermediate, saved and data cashe, deleting the contents of my temp file, restarting, varifying unreal engine files, repairing vs, re pulling my entire project, deleting unreals and vs internal cache, and trying to build using the unreal build tool, which is the closest ive gotten, getting an error:
Couldn’t find target rules file for target ‘ProjectName’ in rules assembly ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’
Location: C:\Program Files\Epic Games\UE_5.4\Engine\Intermediate\Build\BuildRules\UE5Rules.dll;
but now im pretty stumped in what to do next, ive checked the project name is correct, the target files exist, and tryed deleting th dill files, and re verifying, but none worked. if anyone has any ideas, please let me know!
Hello, bro!
Okay, as far as I know, this is could be caused by some things.
I’ll try to go through them but I advise you to backup your current project before trying those.
By the way, if you haven’t done so until now (I assume not), do it. Use Git.
Okay:
Since you are using VS, are you using the right Startup Project? At the top of the screen in the “second line” of the top menu, there will be some dropdowns to select some configuration. Is the configuration there matching your current project and settings? Should look something like: Development Editor | Win64 | YourProjectName
In VS, open the files of your project: PROJECT_NAME.Target.cs and PROJECT_NAMEEditor.Target.cs, and check if the name of the project is correct there. It should match the name of the project first created in UE and the current UE version.
Check the .uproject file to see if the project name and engine version are correct.
Test those out and let us know and, once again, backup your project before trying to do anything I just said.
Good luck bro!
Thanks for the help, the project name is the same across all three, and the configuration matches my project settings. the engine version is correct as well. this project is backed up to git, the werid thing being deleting the local repo files and then repulling from the latest commit didnt solve anything
The only thing I think could add to this is if you remembered to use the General Visual Studio Project Files after deleting Binaries, Intermediated, and Saved, but you probably did that.
If you tried to reset to your last branch and the same problem persists, which file would git not track and would be so important to the project? Hm.
Have you checked if this file actually exists? C:\Program Files\Epic Games\UE_5.4\Engine\Intermediate\Build\BuildRules\UE5Rules.dll
If it does, have you tried to download only that file separately and replacing it?
If it doesn’t, see if something like C:\Program Files\Epic Games\UE_5.5\Engine\Intermediate\Build\BuildRules\UE5Rules.dll exists. If it does, now you need a way to find where that path is being built and change it.
it exists, and since then i have tried doing a fresh install of windows, again, cleaning my drive as well, but it still didnt work. it should be something with unreal engine though as building a normal visual studio file works. i cant find anywhere to download the dll files seperatly though. Thanks for the help!
Im not sure if its suppossed to be, but the dll file is filled with werid symbols
Update:
its definitely an editor issue, it builds fine on development, but development editor causes it to break. im installing a different verson on unreal rn to see if it will fix it
ok, im not sure why, but doing a build > run build insights on solution > rebuild fixed it for some reason. was still getting the error when building normally, but after a while of building like this, i can build normally as well
Running the visual studio or editor as administrator may help to the problem.It seem that the msvc want to create some file in temp directory,but has no permittion.I can package the project when I run as administrator.