I’m using UE5 and vs2022. After trying to regenerate my project files, my c++ solution got corrupted. When I open the file explorer on Windows (Windows 10) and go in the folder containing my solution, File Explorer freezes and then closes on it’s own. Using command lines, I managed to erase the solution.
I tried to generate the project files using the context menu, but the option to generate them isn’t there. I tried using the version selector executable to solve this issue, but it didn’t work. Using the following command line (“D:\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat” -projectfiles -project=“D:\MyProject.uproject” -game -rocket -progress) I was able to generate the project solution. However, the newly generated solution file was corrupted as well. I reinstalled vs2022 and UE5, but the problem still occurred. I tried to create a new Unreal project, but the problem still occurred. I tried creating a C++ project using vs2022 and everything was fine.
UE5 generates corrupted .sln files, but not vs2022.
Does anyone know how to fix this.
Update 1:
Using the following command “Build.bat MyProjectEditor Win64 Development D:\Folder\containing\the\project\MyProject.uproject” I was able to generate the Binaries and Intermediate folders. I’m now able to open my project.
Unfortunately, I’m unable to generate the .sln file. I’ve check online on how to solve this issue. Some said to use the “Generate Project Files” option in the context menu, which isn’t there. Others said to use GenerateProjectFiles.bat, which I couldn’t find in the BatchFiles folder.
For the “Generate Project Files” option, people online said to launch UnrealVersionSelector.exe in the installation folder. It didn’t work.
For the GenerateProjectFiles.bat file, I tried to create it manually using one for UE4, but I quickly realized I have no idea how to adapt it to UE5.