Could not load file or assembly 'Borland.Build.Tasks.Cpp

TwineCompile - Cut C++Builder compile times by up to 50x!
Post Reply
miskol
Posts: 9
Joined: Mon Mar 10, 2025 3:28 pm

Could not load file or assembly 'Borland.Build.Tasks.Cpp

Post by miskol »

I am building my project with this
msbuild /verbosity:normal /consoleloggerparameters:ShowCommandLine /p:config=Release /p:Configuration=Release /t:MakeObjs _AthProjects_Generic\Generic.cbproj
msbuild /verbosity:normal /consoleloggerparameters:ShowCommandLine /p:config=Release /p:Configuration=Release /t:Link _AthProjects_Generic\Generic.cbproj

And MakeObjs is fine but Link ends like this:

(TCPerformLink target) ->
C:\Program Files (x86)\JomiTech\TwineCompile\TCTargets121.targets(782,5): error MSB4062: The "TCLink" task could not be loaded from the assembly C:\Program Files (x86)\JomiTech\TwineCompile\TCTasks121.dll. Could not load file or assembly 'Borland.Build.Tasks.Cpp, Version=29.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask

with TwineCompile 5.8
jomitech
Site Admin
Posts: 2208
Joined: Wed Oct 08, 2008 12:23 am

Re: Could not load file or assembly 'Borland.Build.Tasks.Cpp

Post by jomitech »

Breaking the build steps up like this will prevent the right dependencies from loading correctly. To resolve this, open TCTargets121.targets, locate the TCPerformLink Target, and add this task right at the top:

Code: Select all

<TCInitTasks />
It should look like this:

Code: Select all

...
  <Target Name="TCPerformLink" DependsOnTargets="_ResolveOutput;_CheckLinkDependencies">
    <TCInitTasks />
    <TCUpdateVersionInfo
    ...
Jon
Post Reply