Including files with a .cc extension instead of .cpp in a code project used to build fine in Visual Studio. This is no longer the case in 4.21.2. The error message that results indicates that only C++ files are expected to have CachedCPPEnvironments. However, the .cc extension is considered to be a C++ file.

Yes. This did not occur in 4.21.1. It also does not occur in Main, but this may be because whichever change resulted in this error occurring has not been merged back into Main yet.

Steps to Reproduce
  1. Create a new Basic Code project.
  2. When the project opens in Visual Studio, change the extension of the project's .cpp file to .cc.
  3. Build the project.

The build fails with the following error: UnrealBuildTool : error : Was only expecting C++ files to have CachedCPPEnvironments!

The build completes successfully.

Have Comments or More Details?

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

Login to Vote

Affects Versions4.21.2
Target Fix4.22
CreatedJan 15, 2019
ResolvedJan 16, 2019
UpdatedJan 23, 2019