开发者

Target not being executed when imported to the main *.proj file

I use the TFS 2008 build facilities. I have a large MSBuild project (TFSBuild.proj) and I wanted to split it into a few files because it is becoming hard to maintain.

I found a strange behavior; when I extracted one of the targets (BeforeInitializeWorkspace) to a separate file and then imported it into the main *.proj file, it was not executed. Although, in my MSBuild log, there was information that the target has been imported and overridden, but hasn't been executed. If I have the same tar开发者_开发知识库get defined in my main *.proj file, it is executed. Can someone explain why the target isn't executed when imported from a file?

Thanks,


Me being stupid ;)

I had the order of <Import> wrong. The first file to import was my overridden target, then the Microsoft.TeamFoundation.Build.targets was imported and overrode my target.

Anyway, changing the order helped. So now, the Microsoft.TeamFoundation.Build.targets is the first target to import and then all my other targets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜