创建项目VS文件时,出现MSVC错误

报错:

Running C:/Program Files/Epic Games/UE_5.6/Engine/Build/BatchFiles/Build.bat  -projectfiles -project="C:/Users/ChenCHao/Documents/Unreal Projects_5.6/LyraStarterGame_5.6/LyraStarterGame.uproject" -game -rocket -progress -log="C:\Users\ChenCHao\Documents\Unreal Projects_5.6\LyraStarterGame_5.6/Saved/Logs/UnrealVersionSelector-2025.11.23-11.21.25.log"
Using bundled DotNet SDK version: 8.0.300 win-x64
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="C:/Users/ChenCHao/Documents/Unreal Projects_5.6/LyraStarterGame_5.6/LyraStarterGame.uproject" -game -rocket -progress -log="C:\Users\ChenCHao\Documents\Unreal Projects_5.6\LyraStarterGame_5.6/Saved/Logs/UnrealVersionSelector-2025.11.23-11.21.25.log"
Log file: C:\Users\ChenCHao\Documents\Unreal Projects_5.6\LyraStarterGame_5.6\Saved\Logs\UnrealVersionSelector-2025.11.23-11.21.25.log

Generating VisualStudio2022 project files:
Discovering modules, targets and source code for project...
Adding projects for all targets...
Available x64 toolchains (2):
 * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130
    (Family=14.38.33130, FamilyRank=0, Version=14.38.33145, HostArchitecture=x64, ReleaseChannel=Latest, Architecture=x64)
 * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207
    (Family=14.44.35207, FamilyRank=1, Version=14.44.35217, HostArchitecture=x64, ReleaseChannel=Latest, Architecture=x64)
Unavailable x64 toolchains (1):
 * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933
    (Family=14.34.31933, FamilyRank=1, Version=14.34.31948, HostArchitecture=x64, ReleaseChannel=Latest, Architecture=x64, Error="UnrealBuildTool requires at minimum the MSVC 14.38.33130 toolchain. Please install a later toolchain such as 14.38.33130 from the Visual Studio installer.")
Adding projects for all targets took 0.34s
Unable to find valid 14.34.31933 C++ toolchain for VisualStudio2022 x64

Result: Failed (OtherCompilationError)
Total execution time: 1.39 seconds

在项目的Saved\UnrealBuildTool里, BuildConfiguration.xml文件里添加:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	
	<WindowsPlatform>
		<CompilerVersion >14.38.33130</CompilerVersion>
		<WindowsSdkVersion >10.0.19041.0</WindowsSdkVersion>
	</WindowsPlatform>

</Configuration>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值