Exclude search paths from dproj when creating with msbuild

I am trying to create some Delphi XE projects using msbuild. Although most of them work without problems, some projects that have many (and long) search paths cannot build with this error message:

MSB6003: The specified task executable could not be run. The filename or extension is too long 

I found the reason for this: I add different search paths through / p: DCC_UnitSearchPath = some of them are not in the dproj file. This makes the command very long, and msbuild fails.

So what I want to do here is simply use the element search paths that I set through DCC_UnitSearchPath, but exclude / ignore the search paths from the dproj file.

Is there any way to achieve this?

Thanks,

Greg

+7
delphi msbuild
source share
1 answer

Move parts of your search path to environment variables to access Spring4D , DSharp, and VirtualTreeView :

 DSharp=C:\Users\Developer\Versioned\DSharp Spring4D=C:\Users\Developer\Versioned\Spring4D VirtualTreeView=C:\Users\Developer\Versioned\VirtualTreeView 

Then in your configuration, specify them as follows:

 $(DSharp)\Source\Aspects;$(DSharp)\Source\Bindings;$(DSharp)\Source\Collections;$(DSharp)\Source\ComponentModel;$(DSharp)\Source\Core;$(DSharp)\Source\Logging;$(DSharp)\Source\PresentationModel;$(DSharp)\Source\Validation;$(DSharp)\Source\Windows;$(Spring4D)\Source\Base;$(Spring4D)\Source\Base\Collections;$(Spring4D)\Source\Core\Container;$(Spring4D)\Source\Base\Reflection;$(Spring4D)\Source\Core\Services 
+6
source share

All Articles