I have a component package in Delphi XE2 version 16.0.4429.46931, both a run-time and design-time package together. This package has existed for over a year, and the file/folder structure has always been the same. I keep all the units in a dedicated Source folder from the root, and the actual packages in a Packages folder in the same root. So the packages are found in \Root\Packages\ and units are found in \Root\Source\.
Today, after building the run-time package, I was going through the hints and warnings. One of the warnings was this:
[DCC Warning] Inno.TimeChart.pas(1): W1025 Unsupported language feature: 'class constructor'
The warning its self is not what worries me. The problem is when I double-click this warning, I get an error message from the IDE:

The one thing which I immediately noticed was that it is not looking in the Source folder, but rather directly in the Packages folder. Somehow, the IDE is expecting that the unit be in the same location as the package. Ever since I created the package over a year ago, I have never changed any of the library paths, locations of files, or structure of the package.
The file does exist, but in a different place than it appears to be looking. The file has never been saved in the folder with the projects, and in fact nothing other than the package projects themselves have ever been saved in the Packages folder. This all resides in the Source folder, but the IDE seems to think otherwise.
Why would the IDE think this file is in a different folder? All the other hints and warnings related to the same unit work just fine when I double-click them, but not this one.
EDIT
I've created a new test package to troubleshoot this issue.
Root\TestPackage.dpr
Root\Source\TestPackageUnit.pas
The specific piece of code which is causing this compiler warning is in this class:
type
TMyComponent = class(TComponent)
strict private
class constructor Create;
end;
When I compile, using Process Monitor, I see the IDE is searching in 30+ different places for this file (of course failing), it looks like it's searching in every library path, rather than in the one place the package says it's at.
Things I've Tried
- Verified there is no difference between these paths between the
DPRandDPROJfiles - Installed all the latest updates and the IDE FixPack (actually gave me new problems)
- Monitored file's access with Process Monitor
- Filters: process name equals
BDS.exe; Path ends withTestPackageUnit.pas - Result: "NAME NOT FOUND" --> Desired Access: Generic Read Disposition: Open Options: Synchronous IO Non-Alert, Non-Directory File Attributes: N ShareMode: Read, Write AllocationSize: n/a
- Filters: process name equals
- Tried with designtime-only, runtime-only, and designtime/runtime combined
- Tried with component registered and unregistered
- Tried with directory in library path and not in library path
- Removed about 20 unnecessary entries from library path to make it shorter
- Moved directory to top of library path
- Verified there is no
DOFfile associated with project (That I think is from older versions) - Restarted IDE and computer number of times
- Cleaned up compiled and temporary files from project, including BPL and DCU files
- Changed
strict privateto justprivateand evenpublic
containsclause, maybe you need to restart IDE. Sure IDE should find source files if it compiles them. - kludg$(OutputPathVar)- but restart fixed it. And i saw issues where installers enforced 64-bit paths into 32-bit Delphi environment, deleting original paths. There may be a lot of troubles, but logging would at last give you soem idea what is really happening. - Arioch 'The