1
votes

I'Ve just created a small application with a toolbar, some toolbar buttons and an TPngImageList. I have saved the project and compiled it.

Now I've deleted the .res file in the project folder. When I now open the project in the IDE, delphi says "Res file could not be found. New created". But after that, I can't find the new created res file in my project folder. (In other words: it isn't there!) Why? Thanks!

2
Probably you know, but to make sure: Note you should not delete the .RES file; it contains some information that is not in the project source files (including the project icon).Jeroen Wiert Pluimers
It's created in memory, not saved to disk until you save the project.Ondrej Kelle

2 Answers

1
votes

I just created a new project, Project1.dpr, and saved it in a new, empty, directory. Then I removed Project1.res, and opened the project. Delphi 2009 said

[Window Title]
Warning

[Content]
Cannot find resource file: C:\Users\Andreas Rejbrand\Documents\RAD Studio\Projects\test2\Project1.res.  Recreated.

[OK]

and when I then saved the project, the Project1.res file was recreated. If I close the project without saving, no Project1.res file is created.

0
votes

Check the .dproj file and change

<SkipResGeneration>true</SkipResGeneration>

to

<SkipResGeneration>false</SkipResGeneration>

if it is present.