delphi – 使用msbuild构建时从dproj中排除搜索路径

我正在尝试使用msbuild构建一些Delphi XE项目.
虽然大多数工作没有问题,但是一些具有大量(和长)搜索路径的项目无法使用此错误消息构建:
MSB6003: The specified task executable Could not be run. The filename or extension is too long

我找到了原因:我通过/ p添加不同的搜索路径:DCC_UnitSearchPath =其中一些不在dproj文件中.这使得命令很长并且msbuild失败.

所以我想在这里做的只是使用我通过DCC_UnitSearchPath设置的单元搜索路径,但排除/忽略dproj文件中的搜索路径.

有没有办法实现这个目标?

谢谢,

格雷格

解决方法

搜索路径的一部分移动到环境变量以访问 Spring4D,DSharpVirtualTreeView
DSharp=C:\Users\Developer\Versioned\DSharp
Spring4D=C:\Users\Developer\Versioned\Spring4D
VirtualTreeView=C:\Users\Developer\Versioned\VirtualTreeView

然后在您的配置中指定它们如下:

$(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

相关文章

 从网上看到《Delphi API HOOK完全说明》这篇文章,基本上都...
  从网上看到《Delphi API HOOK完全说明》这篇文章,基本上...
ffmpeg 是一套强大的开源的多媒体库 一般都是用 c/c+&#x...
32位CPU所含有的寄存器有:4个数据寄存器(EAX、EBX、ECX和ED...
1 mov dst, src dst是目的操作数,src是源操作数,指令实现的...