22

Just updated from Windows 8.1 to Windows 10 and now when I try to open any project on Delphi 2007, I get his error :

Unable to load project xxxxx The imported project "c:\Windows\Microsft.NET...\Borland.Delphi.Targets" was not found. Confirm that the path declaration is correct, and that file exists on disk

Any hints to fix it ?

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
delphirules
  • 6,443
  • 17
  • 59
  • 108
  • Did you check the path? Did you find the mentioned project there? – René Hoffmann Jul 31 '15 at 12:09
  • How did you update on Windows 10? If you didn't reinstall windows, it's likely that Win10 was installed in `C:\Windows\\` while your old windows directory has been moved to `C:\Windows.old\\`. – René Hoffmann Jul 31 '15 at 12:11
  • I just downloaded the ISO and follow the update instructions on screen. Anyway, i've just found the solution in the link on the answer. – delphirules Jul 31 '15 at 12:13
  • My Delphi 2007 compile project ok but if I want run with debugger from time to time hangup and software not start. Finally returned to win 8.1 – bendras Aug 09 '15 at 13:47
  • 1
    Note: You can also get this issue when moving from one Windows 10 release to another. I got it moving from 1703 to 1803 – Gerry Coll Aug 22 '18 at 20:46

3 Answers3

43

You need to copy some files in your old Windows folder to the new one. After that projects open again.

The needed files are these :

C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Common.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Cpp.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Group.Targets

Just copy them from the older Windows folder ( C:\Windows.old\Microsoft.NET\Framework\v2.0.50727\ ) to the new one.

Daniel Marschall
  • 3,739
  • 2
  • 28
  • 67
delphirules
  • 6,443
  • 17
  • 59
  • 108
  • 1
    Please summarize the solution here. Stack Overflow does not abide link-only answers. – Rob Kennedy Jul 31 '15 at 12:17
  • 1
    So we can just copy any files? Or does it matter which ones. Please make more effort. – David Heffernan Jul 31 '15 at 14:24
  • Ok, the detailed info are there now ;) – delphirules Jul 31 '15 at 14:32
  • 13
    I've found these files on C:\ProgramData\{B59CE2E6-B15A-4F23-BD0E-72BF2ADDC3C7}\core\7EFD2DA3\6C948720. After coping in c:\windows\Microsoft.NET\Framework\v2.0.50727\ it seems all is working fine – Giorgio Calzolato Sep 14 '15 at 11:09
  • I don't have these files, where can I download them? – Tobia Apr 29 '16 at 09:49
  • I could not copy the files in Explorer for some reasons (even when started as Admin). I had to start a `cmd` with Admin privileges and use the copy command. – TmTron Aug 03 '16 at 08:24
  • C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Common.Targets C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borl and.Cpp.Targets C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Group.Targets – jcfaria Aug 22 '16 at 12:23
  • 1
    Had the same problem after the Win10 anniversary update. Here too the files are found in c:\Windows.old, so your solution fixed it. We should note however that the Windows.old directory is automatically deleted after a couple of days. For the intial Win10 this seemed to be 28 days, for the anniversary update I was told it's only 10 days! – NicolasR Sep 28 '16 at 13:04
  • Had the same problem. Fresh installation of Windows 10 + Delphi 2007 and later on the anniversary update must have removed the files. Had to get them from the c:\programdata path listed above. – Uffe Kousgaard Dec 14 '16 at 22:54
  • unlucky me - I don't have the files anywhere on my disk it seems :( Do you know if they can be downloaded from anywhere? – Tom Apr 06 '17 at 11:03
  • 2
    With a recent update on Windows 10 this happened again and I found this post, searched my HDD for the files and copied it over. All workig well. Thank you. – Hein du Plessis Jul 13 '17 at 08:11
  • @NicolasR you could make an answer out of that, thanks! – CularBytes Sep 27 '19 at 09:59
2

I suspect that you've done an in-place upgrade of Windows. That is probably not compatible with your Delphi installation. Specifically the msbuild target files that you identified in your answer.

But there may well be more issues than this. I recommend performing a repair install of your Delphi. I believe that will bring the Delphi installation into line with the new OS. If you are at all paranoid about in-place upgrades and repair installs then you might contemplate a full Delphi re-installation.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
1

As I was told to make my comment into an answer:

I had the same problem after the Win10 anniversary update. Here too the files are found in c:\Windows.old. As already listed by others, the files are

  • C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Common.Targets
  • C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Cpp.Targets
  • C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets
  • C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Group.Targets

They need to be copied to their corresponding directory in c:\Windows.

You should note however that the Windows.old directory is automatically deleted after a couple of days! For the initial Win10 this seemed to be 28 days, for the anniversary update I was told it's only 10 days! I don't know about newer versions, though.

dummzeuch
  • 10,975
  • 4
  • 51
  • 158
NicolasR
  • 2,222
  • 3
  • 23
  • 38