# Problem with generating project files for source version of engine 4.27. Uses VS2022 instead of 2019

**URL:** <https://forums.unrealengine.com/t/problem-with-generating-project-files-for-source-version-of-engine-4-27-uses-vs2022-instead-of-2019/757275>\
**Category:** Getting Started & Setup\
**Tags:** source-code, unreal-engine, Engine-Source-Code, Engine-Source-GitHub, Visual-Studio\
**Created:** [January 26, 2023, 11:36am UTC](https://forums.unrealengine.com/t/problem-with-generating-project-files-for-source-version-of-engine-4-27-uses-vs2022-instead-of-2019/757275 "2023-01-26T11:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_Q\_R](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S\_Q\_R](https://forums.unrealengine.com/u/S_Q_R)\
**Post date:** [January 26, 2023, 11:36am UTC](https://forums.unrealengine.com/t/problem-with-generating-project-files-for-source-version-of-engine-4-27-uses-vs2022-instead-of-2019/757275/1 "2023-01-26T11:36:34Z")

</div>

Hi.  
I’m trying to build source version of UE4.27. I got Visual Studio 2019 and 2022 installed.  
When I’m using GenerateProjectFiles.bat its generating 2022 (VS17) solution and I want to use VS16 - 2019 as it is recommended in documentation. Any idea how to do that? I started to change Engine\Build\BatchFiles\GenerateProjectFiles.bat where vswhere is calling -latest argument. I changed that for -version [16.0,17.0) it returns proper 2019 version but somehow it still uses 2022. So set explicitly

set MSBUILD\_EXE=“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe”

set MSBUILD\_15\_EXE=“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe”

set MSBUILD\_15\_EXE\_WITH\_NUGET=“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe”  
but it still somehow uses 2022. I lost 4 hours with no success. Any ideas how to make it work without uninstalling 2022?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![S\_Q\_R](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S\_Q\_R](https://forums.unrealengine.com/u/S_Q_R)\
**Post date:** [January 26, 2023, 12:21pm UTC](https://forums.unrealengine.com/t/problem-with-generating-project-files-for-source-version-of-engine-4-27-uses-vs2022-instead-of-2019/757275/2 "2023-01-26T12:21:03Z")

</div>

SOLVED! You need to run .bat from cmd with -2019 parameter. Then is prompts that you can add code snippet to build configuration xml file.

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/2/e420c8d82b55df17e55bb1fa635082b6aedd3e9c.png)
