By default, the file extension descriptions for .DPR and .DPROJ are the same, so in Explorer when opening a project file with the same base name, both file descriptions are listed as "Delphi Project File" This presents a choice to the developer - which file to open?
I typically open the second file listed, assuming it's the DPROJ.
Are there any downsides of opening a DPR when there is a corresponding DPROJ file on file? Does the IDE handle this gracefully?
I sometimes open the first file listed and I haven't noticed any problems, but it's one of those curiosities remaining unanswered. I looked through the help and couldn't find anything.
DPR is the file extension used for the Delphi Project file format to store all the files related to the project. This includes other Delphi file types like Form files (DFMs) and Unit Source files (. PASs).
To open an existing Delphi or C++ project for modelingOn the main menu, choose File > Open Project. In the Open Project dialog box, browse for the project or project group file. Click OK. The selected project (or project group) opens.
A *.dpr file contains delphi source and *.dproj contains the project configuration.
Opening one of them the IDE is looking for the other automatically.
Try to remove the *.dproj file and open the (remaining) *.dpr the IDE will inform you, that a new *.dproj file will be generated.
Do not try to remove the *.dpr :o)
It can be convenient if you use older Delphi versions as well. For instance, you can open dpr
with Delphi 7 and open dproj
with the latest version. It allows you to open both old and new projects with a double click from the Windows Explorer.
Dproj
files are MSBuild compatible files, which is used to compile the projects with.
The Delphi IDE itself doesn't actually need them to open the project. The dproj
file does contain settings and the version number, though, which were stored in the dof
file in Delphi 2006 and before. If the dproj
file cannot be found, it is regenerated with default settings, whereas the dpr
is required and is not regenerated. It's not possible, since it not only contains the uses-list, but also actual initialization code for your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With