4.22 Can't build UnrealVersionSelector due to VersionResource.inl

We recently updated to 4.22 and I now can’t build UnrealVersionSelector. I get this error:

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(15): error RC2135: file not found: VERSIONINFO

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(17): error RC2135: file not found: PRODUCTVERSION

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(18): error RC2135: file not found: 0x17L

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(24): error RC2135: file not found: FILEOS

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(25): error RC2135: file not found: 0x2L

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(28): error RC2164: unexpected value in RCDATA

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(30): error RC2135: file not found: BLOCK

1>\Engine\Source\Programs\UnrealVersionSelector\Private\Windows\Resources\VersionResource.inl(32): error RC2135: file not found: VALUE

When I try to look at the Resource.rc in Visual Studio, it tells me “Load failed”. I don’t think the issue is in VersionResource.inl as it appears similar to all the other VersionResource.inl files from other projects but it’s possible. Any ideas about what is set up incorrectly? I’ve already completed deleted my project folder and redownloaded it and no one else is having this issue, so it’s unique to my machine. My current thought is I’m missing some dependency but I have XDK 180704 and .NET 4.6.2 which I’m led to believe is all the new dependencies for 4.22.

Bumped into this one too, its related to file encoding being messed up somehow.
The first thing I did was re-encode VersionResource.inl to utf-16, I don’t know if this step is necessary.
Second thing that made it compile for me was edit the Resource.rc file next to it and remove the UTF8 BOM. [If I googled this correctly, the resource compliler does not like utf8, resource file needs to be either ansi or utf16]

hth

Thank you so much for responding to this. Looking through our history, the file (Resource.rc) did indeed get corrupted in our last checkin/engine update. It went from human readable to not. While changing the encoding seemed to fix it, we ended up taking Epic’s current version of the whole UnrealVersionSelector folder and overwriting what we have, restoring it to a UTF8 human readable format.

Dang! Same thing happened to me! Not sure how, but ended up having to copy text from UE4 GitHub page straight into the files that were corrupted. Here’s a list of all the ones I had to update:

//depot/UnrealEngine/Engine/Source/Programs/UnrealCEFSubProcess/Resources/Windows/UnrealCEFSubProcess.rc
//depot/UnrealEngine/Engine/Source/Programs/UnrealVersionSelector/Private/Windows/Resources/Resource.h
//depot/UnrealEngine/Engine/Source/Programs/UnrealVersionSelector/Private/Windows/Resources/Resource.rc
//depot/UnrealEngine/Engine/Source/Programs/UnrealVersionSelector/Private/Windows/Resources/VersionResource.inl