I was working on a level design. I had most of it done, all I wanted to do was add a day/night cycle. I added a new actor, opened with C++, and then proceeded to make two files. a .cpp and a .h, maybe only 100 lines long. Never re-loaded the SLN or anything. Had the engine open while doing it, so I think it hot-coded it. Closed the engine, went to go do something, and when I came back and re-opened the project, everything went downhill.
I have been trying to fix it for at least 10 hours now. Like, I deleted the two files I made at some point during all of this trying to get it back to the version where it was literally working perfectly fine.
Starts with opening the project file. Tells me
**âThe following modules are missing or built with a different engine version: MyProject VisualStudioTools VisualStudioBlueprintDebuggerHelper Would you like to rebuild them now?â **
Click yes, little while later
**âEngine modules are out of date, and cannot be compiled while the engine is running. Please build through your IDE.â
**
So you may say âWell it says right there, build through the IDE.â
From here, I would open the SLN file in VS2022 (And even tried it in Rider) and in VS2022 it just wouldnât, giving me two errors;
Summary
C:\Users\XXXXX\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\UE5.vcxproj : warning : The build tools for Visual Studio 2022 (v143) cannot be found. Install Visual Studio 2022 (v143) to build using the Visual Studio 2022 (v143) build tools.
C:\Users\XXXXX\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\UE5.vcxproj : warning : Platform âWin64â referenced in the project file âUE5â cannot be found.
So again, you might say âIt says right there, v143 tools canât be found?â But I assure you, after re-installing VS2022 a few dozen times, the correct v143 and all the other necessary tools are installed.
One important thing;
When I go into the project files, there is a Build folder that does indeed have a Win64 folder. When I open UE5.vcxproj in an editor, it mentions Win64 quite a bit, and one of the lines specifically points towards the C:\Program Files\Epic Games\UE_5.6\Engine\Intermediate\Build\Win64 folder. SoâŚ. I donât know where VS2022 is looking. I ensured the folder exists.
But then some say to change the solution configuration to debug or developer_tool or whatever, which I canât because the only option is BuiltWithUnrealBuildTool. Also tried with Rider, it said the build was fine, but then when actually trying to use UnrealBuildTool in it to debug, it gives me a whole bunch of other errors.
Summary
Log file: C:\Users\XXXX\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for MyProject (no existing makefile)
Compiled assembly file âC:\Users\XXXX\Documents\Unreal Projects\MyProject\Intermediate\Build\BuildRules\MyProjectModuleRules.dllâ appears to be for a newer CLR version or is otherwise invalid. Unreal Build Tool will try to recompile this assembly now. (Exception: Bad IL format. The format of the file âC:\Users\XXXX\Documents\Unreal Projects\MyProject\Intermediate\Build\BuildRules\MyProjectModuleRules.dllâ is invalid.)
C:\Users\XXXX\Documents\Unreal Projects\MyProject\Source\MyProject\MyProject.Build.cs(5,14): error CS0101: The namespace ââ already contains a definition for âMyProjectâ
C:\Users\XXXX\Documents\Unreal Projects\MyProject\Source\MyProject\MyProject.Build.cs(7,9): error CS0111: Type âMyProjectâ already defines a member called âMyProjectâ with the same parameter types
C:\Users\XXXX\Documents\Unreal Projects\MyProject\Plugins\VisualStudioTools\Source\VisualStudioTools\VisualStudioTools.Build.cs(26,17): warning CS0618: âModuleRules.UnsafeTypeCastWarningLevelâ is obsolete: âDeprecated in UE5.6 - Replace with ModuleRules.CppCompileWarningSettings.UnsafeTypeCastWarningLevelâ
Expecting to find a type to be declared in a target rules named âMyProjectTargetâ. This type must derive from the âTargetRulesâ type defined by UnrealBuildTool.
Result: Failed (RulesError)
Total execution time: 2.06 seconds
Process finished with exit code 8.
And then when I go through and delete intermediate/saved/.vsconfig/myproject.sln and re-generate Visual Studio Project Files, it only adds an intermediate folder, a saved folder, .vsconfig, and the sln. For some reason it is not adding the binaries folder.
At one point the UE5.vcxproj was pointing towards C:\Program Files\Epic Games\UE_5.6\Engine\Plugins\Developer and the Developer folder was just.. Gone for some reason. Reinstalled UE5, itâs back, but that didnât fix anything.
I have regenerated the visual studio files numerous times, I have uninstalled and reinstalled VS2022 numerous times.
Any solution Iâve seen relating to this has not worked, and I am lost. I genuinely do not know what to do from here. The project was almost done, with most of the level design done, and now it just wont open.
I have not changed my UE version for anything. At most what I can tell is DLLs arenât being read right. In Rider, a lot of the debug output says stuff along the lines of
âC:\Program Files\Epic Games\UE_5.6\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\shared\Microsoft.NETCore.App\8.0.5\xxxxxxxxxxx.dll was not found or failed to readâ
Which, I went in, each of these .dllâs exist, so Im not sure why it canât read them.