Can I prevent XE8 from adding System.ImageList?
Can I prevent XE8 from adding System.ImageList to my uses in a Form?
No. The IDE will do this come what may. Your options include:
- Wrapping the unit in a conditional so that the XE7 compiler does not see it.
- Create a dummy, empty unit, named
System.ImageList
, that you list in the .dpr file, again wrapped in a conditional so that it is only seen by the XE7 compiler. - Maintain separate .dproj files for the different versions. In the XE7 version add a unit alias that maps
System.ImageList
toSystem
. - Removing the unit before committing using a text editor or a script.
- Having your team standardise on a common version of Delphi.
Personally I would recommend the latter option. Remember that you can happily install multiple Delphi versions side-by-side and, if necessary, use different versions for different projects. This is essential when maintaining release branches of your program.
If you simply cannot do this then the unit alias is perhaps the least invasive option. I guess you don't have the .dproj file under revision control because if you did then you'd be facing similar issues with XE7 modifying the XE8 version and vice versa. So if the .dproj file is outside revision control it should be easy enough to make the modifications locally just for the XE7 users. But a trick like that should only ever be viewed as a temporary stepping stone to keep you afloat until you are all on the same version of Delphi.
More generally, Embarcadero are currently releasing new versions very frequently. It costs time to upgrade. You have to install, iron out any compilation problems, test the build under the compiler, and deal with any defects that arise. You don't have to take every upgrade. It's fine to skip some. It can be more efficient to do so. At my workplace we moved from XE3 to XE7 and are not going to take XE8. If you do take an upgrade, make sure the benefits outweigh the costs.