Description

As far as I can tell this is a regression.
After including C++17 in the build configuration it shouldn't be hidden in the .vcxproj?

Steps to Reproduce
  1. Create a new C++ project
  2. Specify use of C++17 in BuildConfiguration.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <BuildConfiguration>
    <CppStandard>Cpp17</CppStandard>
    </BuildConfiguration>
    </Configuration>
    
  3. Generate project files (right click on .uproject -> Generate Visual Studio project files

Expected Results:
Generated .vcxproj file should look this way:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development_Editor|x64'">
...
<AdditionalOptions>/std:c++17</AdditionalOptions>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\RollingGame27\MyActor.cpp">
...
<AdditionalOptions>$(AdditionalOptions) /Yu"$(SolutionDir)Intermediate\Build\Win64\RollingGame27Editor\Development\Engine\SharedPCH.Engine.ShadowErrors.h"</AdditionalOptions>
</ClCompile>
</ItemGroup>

or

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development_Editor|x64'">
...
<AdditionalOptions>/std:c++17</AdditionalOptions>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\RollingGame27\MyActor.cpp">
...
<AdditionalOptions>/std:c++17 /Yu"$(SolutionDir)Intermediate\Build\Win64\RollingGame27Editor\Development\Engine\SharedPCH.Engine.ShadowErrors.h"</AdditionalOptions>
</ClCompile>
</ItemGroup>

Actual Results:
Generated .vcxproj file contains following code:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development_Editor|x64'">
...
<AdditionalOptions>/std:c++17</AdditionalOptions>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\RollingGame27\MyActor.cpp">
...
<AdditionalOptions>/Yu"$(SolutionDir)Intermediate\Build\Win64\RollingGame27Editor\Development\Engine\SharedPCH.Engine.ShadowErrors.h"</AdditionalOptions>
</ClCompile>
</ItemGroup>

Have Comments or More Details?

There's no existing public thread on this issue, so head over to AnswerHub just mention UE-137267 in the post.

1
Login to Vote

Fixed
ComponentUE - Foundation - DevTools
Affects Versions4.27
Target Fix5.0
Fix Commit18573913
CreatedDec 10, 2021
ResolvedJan 13, 2022
UpdatedJan 13, 2022