# Visual Studio 2022 builds and runs UE5.0

**URL:** <https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060>\
**Category:** Platform & Builds\
**Tags:** General, unreal-engine, UE5-0\
**Created:** [October 9, 2021, 7:14pm UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060 "2021-10-09T19:14:32Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [November 23, 2021, 6:23am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/21 "2021-11-23T06:23:34Z")

</div>

HI @maimonides11,  
I am currently using the UE5 Release\_test version and that seems very stable as well. To cut the long story short VS2022 is still undergoing updates on the new minor version. Officially 🤣🤣UE does not support this for production, but UE5 is experimental. IMHO by the time, it gets released in 2022 UE5 will be able to use VS2022 just like the transition from VS2017 to VS2019

---

<div class="post-metadata">

**Author:** ![MikeSeese](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeseese/32/1022829_2.png) [@MikeSeese](https://forums.unrealengine.com/u/MikeSeese)\
**Post date:** [November 23, 2021, 11:27pm UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/22 "2021-11-23T23:27:37Z")

</div>

I’ve had no issues with using 2022 with the 5.0 branch without engine modifications.

---

<div class="post-metadata">

**Author:** ![NthSandyG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NthSandyG](https://forums.unrealengine.com/u/NthSandyG)\
**Post date:** [December 1, 2021, 11:01pm UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/23 "2021-12-01T23:01:53Z")

</div>

I literally can’t get it to work with any 5.0 branch. I get to the build within the ue5.sln but it just succeeds 3 but fails 1 with an error MSB3073 - I have no idea what’s going on ☹

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [December 2, 2021, 6:59am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/24 "2021-12-02T06:59:22Z")

</div>

> [@NthSandyG](#):
>
> MSB3073

[Getting error MSB3073 (microsoft.com)](https://social.msdn.microsoft.com/Forums/vstudio/en-US/f70c2425-14de-49cf-b228-d29548c9ef87/getting-error-msb3073?forum=msbuild)

There are two problems the path length of your local repository is too long  
mine was originally c:\user\owner\source\repos\ue50-release-test-local.  
this means that when the batch builder tries to make the file it becomes  
c:\user\owner\source\repos\ue50-release-test-local\Engine\Binaries\msbdatetime2022.bat.  
That now hits an old limit set by windows.  
I am now using c:\user\owner\ue50 and this seem to work

Second, if your Appdata directory is hidden this will fail as it needs to create  
Appdata\UnrealEngine directory and there will be a domain protection error in Windows Professional

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [April 19, 2022, 11:46am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/25 "2022-04-19T11:46:07Z")

</div>

There appears to be a problem building UE5 source with the latest version of Visual Studio 2022 and that has a much simpler fix in the GitHub article  
Quoted here for ease

Hi! I was able to reproduce this issue and managed to fix it. UE5 uses [/sourceDependencies](https://docs.microsoft.com/en-us/cpp/build/reference/sourcedependencies?view=msvc-170) compiler option that produces these .cpp.json files.  
The problem is in the latest MSVC compiler (14.32.31326: MSVC v143 - VS 2022 C++ v14.32-17.2). Starting from this version, the “Version” field in the files produced is equal to 1.2.  
As a temporary solution, I suggest downgrading the compiler to any lesser version. I have validated the following versions and confirm they are fine to use.  
14.29.30133: MSVC v142 - VS 2019 C++ v14.29-16.11  
14.30.30705: MSVC v143 - VS 2022 C++ v14.30-17.0  
14.31.31103: MSVC v143 - VS 2022 C++ v14.31-17.1

You can set the compiler version via BuildConfiguration.xml in a way like

```auto
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
    <Compiler>VisualStudio2022</Compiler>
    <CompilerVersion>14.31.31103</CompilerVersion>
</WindowsPlatform>
</Configuration>

```

From the above the line  
CompilerVersion 14.31.31103 has been selected this is an older version of the compiler and is a much quicker fix than changing the source code which is a good fix, just more complicated as you need to know and use extra Git Bash commands.

Note: You would need to Clean and Rebuild your project via IDE

the link to this article is at  
[https://github.com/EpicGames/UnrealEngine/pull/9067#issuecomment-1102164891](https://github.com/EpicGames/UnrealEngine/pull/9067#issuecomment-1102164891)

**Using the Patch described in the Github Pull Request 9067**

$ git remote -v  
origin [https://github.com/EpicGames/UnrealEngine](https://github.com/EpicGames/UnrealEngine) (fetch)  
origin [https://github.com/EpicGames/UnrealEngine](https://github.com/EpicGames/UnrealEngine) (push)

This command will install the VS2022 patch to your repository source code

$ git pull origin pull/9067/head:ue5v22

You will now need to Clean and build UE5 again via Right Click on project

---

<div class="post-metadata">

**Author:** ![benjaminbbq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@benjaminbbq](https://forums.unrealengine.com/u/benjaminbbq)\
**Post date:** [May 8, 2022, 7:42am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/26 "2022-05-08T07:42:26Z")

</div>

i am using lastest VS2022 version to build the UE5.0.1 codebase. and it cannot launch the EpicGame launcher. it stopped running in 75% and quit. Error prompt: failed to load plugin “VisualStudioCodeSourceCodeAccess”, VisualStudioCodeSourceCodeAccess can not be opened. and i have modified the toolchain and tried again, the same error.  
some other solutions i have already tried, still not working out.

any suggestion to fix this? i have been working on this for weeks. thanks for reply…

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [May 9, 2022, 4:39pm UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/27 "2022-05-09T16:39:17Z")

</div>

Hi @benjaminbbq,  
To find if you have this plugin you need to look in

> C:\Program Files\Epic Games\UE\_5.0\Engine\Plugins\Developer\VisualStudioCodeSourceCodeAccess\Intermediate\Build\Win64\UnrealEditor\Development\VisualStudioCodeSourceCodeAccess

For “UnrealEditor-VisualStudioCodeSourceCodeAccess.lib”

You can disable the use of the plugin as below

 ![Screenshot (203)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/2/9029d23102305b07bb6b41236ef60a15eaf3e789.jpeg)

Check that your installation is good and all plugins loaded

 ![Screenshot (204)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/0/17024e8cdfc9c69dc7f26a98579e48d5c2b585a0.jpeg)

---

<div class="post-metadata">

**Author:** ![benjaminbbq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@benjaminbbq](https://forums.unrealengine.com/u/benjaminbbq)\
**Post date:** [May 10, 2022, 6:42am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/28 "2022-05-10T06:42:17Z")

</div>

@Jimbohalo10 thanks for share the solution. i have checked the setting as your suggestion above. that is for the epic game launcher is already opened. my issue is that building from the ue5 source code and the ue5 engine[epic game launcher] can’t start(open) after the vs2022 builded. 😂  
anyway, thanks for the suggestion. it may help in another way.

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [May 12, 2022, 9:07am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/29 "2022-05-12T09:07:18Z")

</div>

Hi @benjaminbbq,

Epic Launcher does not, currently support VS2022, only VS2019. The BINARY is built in VS2019. That is why the VS2022 source created is quicker.

The UE Editor can be launched by creating a desktop shortcut as below

 ![Screenshot (206)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/7/4876d92d0423c39f95568288a3a9baeb686b9f19.png)

You can also launch directly into your project by

 ![Screenshot (207)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/f/46f04383c4dcbd74b238069f692d659a9388aa61.png)

You can send the “MyProj.uproject” to the desktop to launch the project in the Editor. It’s in a Blue shortcut

 ![Screenshot (208)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/c/86c344e23149da63d782af3ec0bb6b40f8240130.png)

This is something due to appear in Epic Launcher later  
much later for version 5.X.y, but is supported in 4. \* 🤣

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [May 16, 2022, 10:26am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/30 "2022-05-16T10:26:36Z")

</div>

Hi All,  
While trying to build UE5-main, today 16th May 2022.  
I have encountered an error based on VS2022  
This was a link error

> Error LNK1181 cannot open input file ’ ROOT:\ue5main\Engine\Source\ThirdParty\etc2comp\lib\Win64\Release\EtcLib.lib ’

In the source, there is a file at  
ROOT:\ue5-main\Engine\Source\ThirdParty\etc2comp\BuildForUE  
BuildForWindows.bat which needs to be run in the  
If you don’t have VS2019 installed change the line

> “%\_vsinstall%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe” -G “Visual Studio 16 2019” -A x64 “%PATH\_TO\_CMAKE\_FILE%”

to

> “%\_vsinstall%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe” -G “Visual Studio 17 2022” -A x64 “%PATH\_TO\_CMAKE\_FILE%”

Open the Start Menu\Programs\Visual Studio 2022\Visual Studio Tools\VC  
x64 Native Tools Command Prompt for VS 2022

> cd ROOT:\ue5-main\Engine\Source\ThirdParty\etc2comp\BuildForUE  
> BuildForWindows.bat

for some unknown reason even with 2019 installed this will not be built automatically so you must restart the UE5 2022 build again

There may be other ThirdParty libraries that need fixing using the same method above and these can be found using “Find Files” and the search parameter “Visual Studio 16 2019”

---

<div class="post-metadata">

**Author:** ![benjaminbbq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@benjaminbbq](https://forums.unrealengine.com/u/benjaminbbq)\
**Post date:** [May 19, 2022, 12:59am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/31 "2022-05-19T00:59:10Z")

</div>

see, thanks for all your guidelines very mush. i am using the editor installed instead of lastest sourcecode as you said above. now it work for temporary. thanks for your reply

---

<div class="post-metadata">

**Author:** ![Jimbohalo10](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jimbohalo10/32/961440_2.png) [@Jimbohalo10](https://forums.unrealengine.com/u/Jimbohalo10)\
**Post date:** [April 11, 2023, 5:41am UTC](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060/32 "2023-04-11T05:41:20Z")

</div>

Hi All,  
There is a problem with the new version 17.6 preview 2 wiith UE5.1 onward. It simply wont build without vs2019.  
the Generateprojects.bat -2022 will not complete

I have made a patch listed in the posted in the thread below

[Toolchain 14.32.31326 which comes as the default of VS2022 v17.2 onward cannot compile UE5 - Programming & Scripting](https://forums.unrealengine.com/t/toolchain-14-32-31326-which-comes-as-the-default-of-vs2022-v17-2-cannot-compile-ue5/578788/4)

[Previous page](https://forums.unrealengine.com/t/visual-studio-2022-builds-and-runs-ue5-0/255060.md?page=1)
