This is a short guide on getting the freshly released UE 4.22 source build, launcher build and any existing projects to compile & work with VS2019.

If you have a launcher build i.e. not building the engine from source, you’ll only need to do what’s under “Getting your projects to use VS2019″.

I also cover a small workaround to getting your games to package successfully in this new environment.

Getting the source build of the engine to use VS2019:

Download the source build of 4.22 from the Epic GitHub Run Setup.bat Find & edit your VCToolChain.cs to get rid of the warnings peculiar to VS2019 that would break your build: Go to line 484 where it says “Arguments.Add(“/wd4838″);” and add these two lines below:

Arguments.Add(“/wd4800”);

Arguments.Add(“/wd5038”); Run GenerateProjectFiles.bat with the -2019 flag, i.e. GenerateProjectFiles.bat -2019 Open the generated UE4.sln file: VisualStudioVersion should be set to 16. Look for this:

# Visual Studio Version 16

VisualStudioVersion = 16.0.28315.86 Open the sln in Visual Studio 2019 Set configuration to Development Editor, 64-bit, Windows Build the engine (F6)

Getting your projects to use VS2019:

First, get your engine to use VS2019 (see above). Open your editor Edit -> Editor Preferences… Change “Source Code Editor” to Visual Studio 2019

Close the editor Edit or create Config/DefaultEditorSettings.ini and add the following to the end of the file:

[/Script/SourceCodeAccess.SourceCodeAccessSettings]

PreferredAccessor=VisualStudio2019 Delete the Binaries and Intermediate folders from your project. Delete the project’s .sln Right-click the project’s .uproject file: Switch Unreal Engine version… –> set it to your freshly compiled source build even if it’s already set to it. Right-click the .uproject file again: Generate Visual Studio project files Open the project’s .sln in VS2019 and build (F6). That’s it!

Packaging a game successfully:

You might be getting errors in FileLockInfo.cs once you try packaging your game. The errors are related to Gauntlet Automation, and so far I only have a workaround for them.

Every time you want to package your game, do this (source):

Open your game’s .sln in Visual Studio 2019 Expand the Programs folder in the solution explorer. It’s sitting besides the Games folder. Expand the Automation folder inside Programs Right-click Gauntlet.Automation –> Rebuild Now launch your editor like you normally would (F5) and it should package just fine.

Keep in mind that you have to do this every single time you want to package the game.

Any questions / corrections let me know in the comments below!

-David