How to add resources? (Island)

I want to add a resource in Visual Studio, but does not exist in the template.
How do I add .rc or .res(x)?
I tried adding a .txt file to the project and set the Build Action to Resource, but a build error occurred.
“() Unsupported resource file type (.txt).”

Elements version 10.0.0.2331

Island/Windows currently only supports Windows resource file format resources, ie .res files. Any resource types (images, text, etc) need to be packaged like that.

If you have a .rc file, you will need to manually build it into a .res using rc.exe (we have an open feature request to have the build chain do that automatically for you in the future, but I’m afraid that is not implemented yet).

the .resx resources format (and more specifically the .resources format t gets turned into on compile) is specific to .NET, and as far as I know there would be no way access resources in that format for native code, even if we allowed embedding a resource of that format

I will see if I can bump the priority for .rc support in the tool chain, and I will also try and write a documentation topi on resources on the various platforms and their differences, as I believe that would be helpful to have.

Thank you.
OK, for a while, I will manually create the .rc file, build it and get the .res file.

1 Like

FWIW, Work in progress: https://docs.elementscompiler.com/Projects/Resources/