gpt4 book ai didi

msbuild - MSBuild 如何检查目标是否是最新的?

转载 作者:行者123 更新时间:2023-12-04 01:47:40 25 4
gpt4 key购买 nike

MSBuild 针对最新目标发出以下消息:

Skipping target "MyTarget" because all output files are up-to-date with respect to the input files.

实际检查是如何进行的?

最佳答案

查看Incremental Build的流量:

A target element can have both an Inputs attribute, which indicates what items the target > expects as input, and an Outputs attribute, which indicates what items it produces as output MSBuild attempts to find a 1-to-1 mapping between the values of these attributes. If a 1-to-1 mapping exists, MSBuild compares the time stamp of every input item to the time stamp of its corresponding output item. Output files that have no 1-to-1 mapping are compared to all input files. An item is considered up-to-date if its output file is the same age or newer than its input file or files.

If all output items are up-to-date, MSBuild skips the target. This incremental build of the target can significantly improve the build speed. If only some files are up-to-date, MSBuild executes the target but skips the up-to-date items, and thereby brings all items up-to-date. This is known as a partial incremental build.

关于msbuild - MSBuild 如何检查目标是否是最新的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6982372/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com