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:

  1. Download the source build of 4.22 from the Epic GitHub
  2. Run Setup.bat
  3. Find & edit your VCToolChain.cs to get rid of the warnings peculiar to VS2019 that would break your build:
    1. Go to line 484 where it says “Arguments.Add(“/wd4838″);” and add these two lines below:
      Arguments.Add(“/wd4800”);
      Arguments.Add(“/wd5038”);
  4. Run GenerateProjectFiles.bat with the -2019 flag, i.e. GenerateProjectFiles.bat -2019
  5. Open the generated UE4.sln file: VisualStudioVersion should be set to 16. Look for this:
    # Visual Studio Version 16
    VisualStudioVersion = 16.0.28315.86
  6. Open the sln in Visual Studio 2019
  7. Set configuration to Development Editor, 64-bit, Windows
  8. Build the engine (F6)

Getting your projects to use VS2019:

  1. First, get your engine to use VS2019 (see above).
  2. Open your editor
  3. Edit -> Editor Preferences…
  4. Change “Source Code Editor” to Visual Studio 2019
  5. Close the editor
  6. Edit or create Config/DefaultEditorSettings.ini and add the following to the end of the file:
    [/Script/SourceCodeAccess.SourceCodeAccessSettings]
    PreferredAccessor=VisualStudio2019
  7. Delete the Binaries and Intermediate folders from your project.
  8. Delete the project’s .sln
  9. 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.
  10. Right-click the .uproject file again: Generate Visual Studio project files
  11. Open the project’s .sln in VS2019 and build (F6).
  12. 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):

  1. Open your game’s .sln in Visual Studio 2019
  2. Expand the Programs folder in the solution explorer. It’s sitting besides the Games folder.
  3. Expand the Automation folder inside Programs
  4. Right-click Gauntlet.Automation –> Rebuild
  5. 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

Published
Views 3207

Comments

No Comments

Leave a Reply