Unreal engine 5.5.4 not working with Visual Studio 2022

I’m having a problem where whenever I try to launch visual studio 2022 from my ue5 project it opens up a cmd with the wrong path location for the visual studio 2022 build tools. I have followed epic games’s tutorial for installing vs 2022, and reinstalling it didn’t help. Manually opening the project from vs works, but once I try to run the development mode with local windows it games me this error Game files required to initialize the global shader library are missing from:

C:/Users/Adrian/Documents/Unreal Projects/GameIdea1/Content/

Please make sure the game is installed correctly.
In the ue5 editor prefrences I have the code editor set to visual studio 2022, and refreshing the code doesn’t help

Hi,

I’m not sure, but it may solve your issue.

Regenerate your project solution, open it. On Visual Studio define your game as project initialization by right clicking on your game solution in the solution explore.

I’ve got something similar and I’ve solved in this way.

You may found something like this, the UE5 solution is the default.

So after you define your game as default initialization, it gets bold.

May that help you, bye!

So I have set the game as the default solution, but it still gives me this error

I have set the game as default solution and it is bold but it still gives me this error

When you try to compile your game, do you get any error on your visual studio output?

It seems something with your project, have you tried to create another UE project in order to check if get the same error?

Yep, I have created a different project and it works. From the current project I deleted the .vs and .vscode folders. Now when I try running the game development in vs it tells me if I want to use the latest correct build, and when trying to open ue5 it gets stuck on performing replace references. Same thing happens in vscode, but there it highlights this line. The only thing I have added in c++ are a 2 classes, where I followed a tutorila. For the guy it worked with no problems.
image

Try the following steps:

After all, use this video as reference in way to add classes: https://www.youtube.com/watch?v=FBpnOuCgHu4

This may solve your issue, good luck.

After doing the steps you mentione I get this in vs. It tells me that there were build error, the in tells me that it was built with a different engine version. Same applies to if I try to launch it from epic games. This is a clone but I got the same result with the original, and it went back to normal after I restored the original files. Additionally vs give me exit code 8
The command “C:\UE_5.5\Engine\Build\BatchFiles\Build.bat GameIdea1Editor Win64 Development -Project=“C:\Users\Adrian\Documents\Unreal Projects\GameIdeaTEST\GameIdeaTEST.uproject” -WaitMutex -FromMsBuild -architecture=x64” exited with code 8.