ue5生成vs工程報錯-msvc版本太舊

赵青青發表於2024-05-19

ue生成VS工程報錯

右鍵 - uproject ,Generating VisualStudio project files ,報錯資訊如下:就是我安裝的msvc版本太舊

Running C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles/Build.bat  -projectfiles -project="D:/ue/myue/myue.uproject" -game -rocket -progress -log="D:\ue\myue/Saved/Logs/UnrealVersionSelector-2024.05.17.log"
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="D:/ue/myue/myue.uproject" -game -rocket -progress -log="D:\ue\myue/Saved/Logs/UnrealVersionSelector-2024.05.17.log"
Log file: D:\ue\myue\Saved\Logs\UnrealVersionSelector-2024.05.17.log
Log file: C:\Users\zhaoqingqing01\AppData\Local\UnrealBuildTool\Log_GPF.txt

Generating VisualStudio project files:
Discovering modules, targets and source code for project...
Microsoft platform targets must be compiled with Visual Studio 2022 17.4 (MSVC 14.34.x) or later for the installed engine. Please update Visual Studio 2022 and ensure no configuration is forcing WindowsTargetRules.Compiler to VisualStudio2019. The current compiler version was detected as: 14.29.30154

開啟vs的安裝選項,勾選以下

  • .NET桌面開發
  • 使用C++的桌面開發
  • 通用Windows平臺開發,實測這條不是必須的,在釋出時才需要
  • 使用C++的遊戲開發

勾選【使用C++的遊戲開發】,可以看到有個 面向Unreal Engine的IDE支援

文件:為虛幻引擎C++專案設定Visual Studio開發環境 | 虛幻引擎 5.3 文件 | Epic Developer Community (epicgames.com)

已安裝新的但未識別

按照官方文件操作之後,已安裝新的,但還是報此錯

在vs的安裝選項,切到單個元件這裡,搜尋【生成工具】,找到舊的,把舊的解除安裝

PS:我安裝了多個版本的VS,vs2017和vs2019的都要解除安裝才行,vs2022沒有安裝14.29,但是其它兩個版本安裝了

簡單的方法,就是在單個元件這裡搜尋報錯中的版本,找到解除安裝就行。

相關文章