Reputation: 7390
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 ?
Upvotes: 23
Views: 24425
Reputation: 16045
A similar problem would be when
This is not quite the same problem, but Google Search leads here for both, so let it be kept in one place.
The trick is, actually there are TWO copies of MSBuild
Delphi only installs its configs into the 32-bits folder, thus the scripts running from 64-bits command line fail.
To make the scripts work one should copy the 4 files mentioned in the answer (https://stackoverflow.com/a/31745908/976391 ) into BOTH those folders, not just one.
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Common.Targets
C:\windows\Microsoft.NET\Framework64\v2.0.50727\Borland.Common.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Cpp.Targets
C:\windows\Microsoft.NET\Framework64\v2.0.50727\Borland.Cpp.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets
C:\windows\Microsoft.NET\Framework64\v2.0.50727\Borland.Delphi.Targets
C:\windows\Microsoft.NET\Framework\v2.0.50727\Borland.Group.Targets
C:\windows\Microsoft.NET\Framework64\v2.0.50727\Borland.Group.Targets
Upvotes: 0
Reputation: 7390
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.
Upvotes: 44
Reputation: 2312
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
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.
Upvotes: 1
Reputation: 612784
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.
Upvotes: 2