Using the same visual studio 2022 on two versions of the UE5 editor

Hello,
I’m trying to build two different projects at separate times. One is UE5.0 and the other is UE5.3. My version 5.0 is muuuuch bigger and it would take quite a bit to upgrade it to 5.3. So I’m not going to do that right now. (I’ve already tried and know how much work it will be) I have visual studio working great to build my 5.3 project. When I try to build my 5.0 project it says “exit code=6” which is usually a missing component/module of visual studio. I tried to use 2019 but it gives an error about having 2022 already installed. So here is my question:

Can I build with the same visual studio installation, for two separate projects in two separate versions? If so, what component am I missing for version 5.0 that doesn’t affect version 5.3?

I do not want to just start installing VS components/modules randomly. It is already quite a bit to get the right modules working. Thanks.

I have found a solution. After trying this many different ways, I could not get it to build both of the different versions of unreal with the same modules installed. In the Visual Studio installer, there is an option for “more” under modify and launch. I used that to export the settings for each engine version once I got it to build the projects. Now I have saved settings that I can swap between to build each project as needed. It isn’t the solution that I wanted but it is functional. I hope this helps someone else trying to do this. Take care.