VS2013 Error RC2247 when editing .rc file

Branch: Binary
Build version: 4.4.1-2270799+++depot+UE4-Releases+4.4

Detailed description of the issue:
When attempting to open/edit the pregenerated .rc file (by double-clicking it), an error message appears:

C:\Program Files\Unreal Engine\4.4\Engine\Source\
Runtime/Launch/Resources/Version.h(0)

error RC2247: SYMBOL name too long

The path is for some reason split into two lines with the second line having forward slashes, I have no idea why. It’s definitely a manual linebreak rather than it running out of horizontal space.

Screenshots/Link to video:

Repro Steps:

  1. Create/open a UE4 project, tested with both the Strategy Game sample and the Code Top Down template
  2. Double-click Source/Resources/Windows/.rc

It appears to be fully reproducible for me, tested with both 4.4.1 and 4.3.1. Appears to happen on both and Windows 8.1, both fully up-to-date and using Visual Studio 2013 Professional Update 3.

Hi ,

Where are you creating your projects on your computer. When I follow the steps you have above I get a different error message (which will still need to be investigated) with a different file path. The file path in the error message you displayed seems to be pointing to a location inside the Engine installation folders. The file path that I see is pointing to the actual .rc file.

C:\Users\.\Documents\Unreal Projects\
TestRC\Source\TestRC\Resources\Windows\TestRC.rc(12)

fatal error RC1015: cannot open include file 'Runtime/Launch/Resources/Version.h'.

If you click OK when you see the error message displayed for you, does it complete the process of opening the file to be edited?

It does not continue opening the file - the Resource View tab changes to look like this.

I just replicated it myself with a new project, using the following steps:

  1. Open the UE4 Launcher
  2. Download the Strategy Game sample, if you don’t have it
  3. Click “Create Project” under the Strategy Game sample’s box
  4. Choose to create it in ~/Projects, keep the default name of StrategyGame
  5. Open ~/Projects/StrategyGame, right-click on StrategyGame.uproject and choose “Generate Visual Studio project files”
  6. Open StrategyGame.sln, double-click StrategyGame/StrategyGame/Source/Resources/Windows/StrategyGame.rc

The engine version it launches with is different here (4.3.1-2226335+++depot+UE4-Releases+4.3), as StrategyGame does not support 4.4 (yet?), but the error is the same.

Indeed, I was able to edit the file, but not in the way you’re intended to. I don’t need to edit it at the moment anyways, but it certainly looked like a bug. Good to know you’re looking into it.

Hi ,

I see where I was going wrong. I was opening the project from the Windows Explorer (which gives the error message I mentioned above) instead of using the Solution Explorer inside Visual Studio. I tried double-clicking the .rc file in Visual Studio, and the initial result was that VS opened the Resource Explorer, but it remained completely blank. I did some additional experimenting within Visual Studio and was able to reproduce the same error message that you described.

  1. Right-click on the .rc file.
  2. Select Open With...
  3. Resource View is set as the default option.
  4. Selected Resource Editor and clicked OK.
  5. Received the error message you described, clicked OK.
  6. Received error message stating the file cannot be opened by the selected Editor and to select another one, clicked OK.
  7. Visual Studio returned me to the Open With window.
  8. Selected C++ Source Code Editor and clicked OK.
  9. File was opened successfully for editing.
  10. Repeated steps 1-3.
  11. Selected Resource Editor, clicked Set as Default, then clicked Cancel.
  12. Double-clicked the .rc file.
  13. Received the error message you described above, clicked OK.
  14. Received the error message you described above a second time, clicked OK.
  15. File was opened successfully for editing.
  16. Repeated steps 1-3.
  17. Selected C++ Source Code Editor, clicked Set as Default, then clicked Cancel.
  18. Double-clicked the .rc file.
  19. File was opened successfully for editing.

This does not seem to be correct behavior for this file, and I will be submitting a report of what I found to our development team for further investigation. I just wanted to let you know what I discovered, and that there do appear to be some ways to be able to edit the file. None of the options that allowed me to open the file seemed to populate the Resource View window, though.