微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

原文地址:https://www.jb51.cc/delphi/101844.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐