The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,842 other followers

Delphi on Windows x64: solution when project compiles fine under IDE, but not using MSBuild

Posted by jpluimers on 2015/04/21

Especially when using Delphi 2007 on Windows x64 system (8.x, 7, Vista, 2012 Server, 2008 Server, …), the Delphi specific .Targets files used by msbuild are simply installed to the wrong location.

A better warning for this is in my BeSharp.net repository: Run-Dependend-rsvars-From-Path.bat thanks to David Millington who wrote this:

If you copy

  • Borland.Common.Targets
  • Borland.Cpp.Targets
  • Borland.Delphi.Targets
  • Borland.Group.Targets

from

  • %windir%\Microsoft.NET\Framework\v2.0.50727

to

  • %windir%\Microsoft.NET\Framework64\v2.0.50727

then building via the command line works.

The rsvars.bat file is correct.

Note that my batch file checks for all target file sets:

Delphi 2007:

  set requiredTargets=Borland.Common.Targets Borland.Cpp.Targets Borland.Delphi.Targets Borland.Group.Targets

Delphi 2009 and up:

  set requiredTargets=CodeGear.Common.Targets CodeGear.Cpp.Targets CodeGear.Delphi.Targets CodeGear.Deployment.Targets CodeGear.Group.Targets CodeGear.Idl.Targets CodeGear.Profiles.Targets
  if %bdsVersion%==8 set requiredTargets=CodeGear.Common.Targets CodeGear.Cpp.Targets CodeGear.Delphi.Targets CodeGear.Group.Targets CodeGear.Idl.Targets
  if %bdsVersion%==13 set requiredTargets=CodeGear.Common.Targets CodeGear.Cpp.Targets CodeGear.Delphi.Targets CodeGear.Deployment.Targets CodeGear.Group.Targets CodeGear.Profiles.Targets

 

–jeroen

via [WayBack] QualityCentral: Project compiles fine under IDE, but not using MSBuild.

3 Responses to “Delphi on Windows x64: solution when project compiles fine under IDE, but not using MSBuild”

  1. […] a set of targets files that gather information about the projects and environment. Over time the targets files for Delphi historically are named CodeGear.*.Targets and perform the Delphi (and C++ Builder) specific parts […]

  2. David M said

    That’s a blast from the past…!

    Oddly enough I can’t see my name in that QC report, but instead the name of a QA staff member for the company I was working for at the time. Where did you see it? (It’s quite possible it’s there – at the time I was “the” Delphi guy, and I know other staff sometimes borrowed my QC account when they needed to do something, post bugs, comment on reports, etc.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: