NAnt:检查是否已经包含了include文件 [英] NAnt: Check if include file was already included

查看:91
本文介绍了NAnt:检查是否已经包含了include文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道一种检查文件是否已经包含的方法吗?

Does anybody know a way to check if a file was already included?

<include buildfile="${script.dir}\util.include.nant" />
.
.
.
.
<include buildfile="${script.dir}\util.include.nant" />

这将引发一个例外,即目标已重复.有办法吗?

This will throw an exception that a target was duplicated. Is there a way around?

预先感谢

推荐答案

刚刚看到这个问题似乎相关,并决定将a.build中重复项之一的大小写更改为我的另一答案:

Just saw this question which seems related and decided to change the case of one of the duplicate includes in a.build in my other answer to:

<include buildfile="c.build" />
<include buildfile="C.build" />

景气-重复的目标错误.看起来nant足够亮,可以忽略重复的包含,但是在比较它们时区分大小写.

Boom - duplicate target error. Looks like nant is bright enough to ignore duplicate includes, but is case sensitive when comparing them.

这篇关于NAnt:检查是否已经包含了include文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆