Skip to content

Instantly share code, notes, and snippets.

@IgnoredAmbience
Last active November 1, 2023 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IgnoredAmbience/37ef8be48ffd58ee1c92d5b660ff6e3b to your computer and use it in GitHub Desktop.
Save IgnoredAmbience/37ef8be48ffd58ee1c92d5b660ff6e3b to your computer and use it in GitHub Desktop.
Delphi GetIt Dependency Compile Build Error Fix

Problem

When setting GetIt dependencies on a project, Emarcadero Delphi 10.2 Tokyo will fail the build with this error:

Project [...] (Make target(s)):
Target _CheckGetItPackageDependencies:
    Target _ExecGetItCmd:
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets : warning : Checking GetIt package dependencies
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(305,5): error MSB4018: The "GetItCmd" task failed unexpectedly.
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(305,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(305,5): error MSB4018:    at Borland.Build.Tasks.Common.CommandLineTask.Execute()
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(305,5): error MSB4018:    at Borland.Build.Tasks.Shared.GetItCmd.Execute()
        c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(305,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
    Done building target "_ExecGetItCmd" in project [...] -- FAILED.
Done building target "_CheckGetItPackageDependencies" in project [...] -- FAILED.

Solution

Set the BDSHost environment variable to true in the Delphi IDE settings:

  1. Go to Tools > Options.
  2. Go to Environment Options > Environment Variables.
  3. Under User overrides, click New.
  4. Variable name: BDSHost, Variable value: true.
Copy link

ghost commented Jun 25, 2019

thank's

@brenooandrade
Copy link

thank's

you area a master! congratulations!

@taneralgin
Copy link

Thanks,

@bennybechdk
Copy link

thanks

@Wayder
Copy link

Wayder commented Apr 7, 2022

Thanks!!!

@gosshawk2
Copy link

Oh yes ! Thank you very much !

@RamonSouza96
Copy link

Thanks!!!

@menagueur
Copy link

thanks

@gabrielgv456
Copy link

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment