MSBuild 字彙表MSBuild glossary

這些詞彙可用來說明 Microsoft Build Engine (MSBuild) 及其元件。These terms are used to describe the Microsoft Build Engine (MSBuild) and its components.

字彙表Glossary

AssemblyFoldersExAssemblyFoldersEx
一個登錄位置,協力廠商可在其中儲存每個架構版本的路徑,而他們支援設計階段的解決方案可期望在這些架構路徑中找到參考組件。A registry location where third party vendors store paths for each version of the framework that they support where design time resolution can look to find reference assemblies.

批次處理batching
批次處理表示會根據項目中繼資料,將項目分割成不同的類別 (稱為「批次」 ),然後使用每個批次一次執行一或多個目標。Batching means dividing items into different categories known as batches, based on item metadata, and then running a target or task one time by using each batch. MSBuild 批次處理相當於 for 迴圈建構。Batching is the MSBuild equivalent of the for--loop construct. 如需詳細資訊,請參閱批次處理For more information, see Batching.

建置範圍build-scope
建置範圍會說明一個 MSBuild 物件 (例如,全域屬性),而專案及多專案組建中所建立的任何子專案可能會看見此物件。Build-scope describes an MSBuild object, for example, a global property, that is potentially visible to a project and to any child projects that are created in a multi-project build.

子專案child project
請參閱<專案,子系> 。See project, child.

條件condition
您可以有條件地定義許多 MSBuild 項目,也就是,項目中會出現 Condition 屬性。Many MSBuild elements can be defined conditionally; that is, the Condition attribute appears in the element. 除非條件判斷值為 true,否則會忽略條件式項目的內容。The contents of conditional elements are ignored unless the condition evaluates to true. 如需詳細資訊,請參閱條件For more information, see Conditions.

定義,項目definition, item
請參閱<項目定義> 。See item definition.

發出項目emit item
在組建的執行階段,可以透過具有子系 Output 項目 (Element) (內含 ItemName 屬性) 的工作來建立或修改項目 (Item)。During the execution phase of a build, items can be created or modified by tasks that have child Output elements that have the ItemName attribute. 此工作即稱為「發出」新的項目。The task is said to "emit" the new items.

發出屬性emit property
在組建的執行階段,可以透過具有子系 Output 項目 (內含 PropertyName 屬性) 的工作來建立或修改屬性。During the execution phase of a build, properties can be created or modified by tasks that have child Output elements that have the PropertyName attribute. 此工作即稱為「發出」新的屬性。The task is said to "emit" the new property.

評估階段evaluation phase
評估是專案建置的第一個階段。Evaluation is the first phase of a project build. 所有的屬性和項目都會以其在專案中出現的順序來評估。All properties and items are evaluated in the order in which they appear in the project. 匯入的專案則是在專案中遇到它們時進行評估。Imported projects are evaluated as they are encountered in the project. 目標和工作要到執行階段才會執行,而它們所宣告或發出的任何屬性或項目則會在評估期間遭到忽略。Targets and tasks are not run until the execution phase, and any properties or items they would declare or emit are ignored during evaluation.

執行階段execution phase
執行是專案建置的第二個階段。Execution is the second phase of a project build. 此階段會建置所選取的目標並執行工作。Selected targets are built and tasks are run. 相較於屬性和項目的評估值,可建立或修改它們。Properties and items can be created or modified compared to their evaluation values.

函式,屬性function, property
請參閱<屬性函式> 。See property function.

函式,項目function, item
請參閱<項目函式>。See item function.

項目item
項目 (Item) 是建置系統的輸入,會根據它們的項目 (Element) 名稱分組到項目 (Item) 類型。Items are inputs into the build system, and are grouped into item types based on their element names. 項目通常代表檔案。Items typically represent files. 由於項目是根據其所屬的項目類型來命名,因此可交換使用「項目」 和「項目值」 等詞彙。Because items are named by the item type they belong to, the terms item and item value can be used interchangeably. 如需詳細資訊,請參閱項目For more information, see Items.

項目定義item definition
項目定義群組包含要將預設中繼資料加入任何項目類型的項目定義。Item definition groups contain item definitions that add default metadata to any item type. 如同已知的中繼資料,預設的中繼資料會與指定項目類型的所有項目相關聯。Like well-known metadata, the default metadata is associated with all items of the specified item type. 您可以在項目定義中明確覆寫預設的中繼資料。Default metadata can be explicitly overridden in an item definition. 如需詳細資訊,請參閱項目定義For more information, see Item definitions.

項目函式item function
項目函式會在專案中取得項目的相關資訊。Item functions get information about the items in the project. 這些函式會簡化取得 Distinct() 項目的方式,速度比執行項目迴圈還快。These functions simplify getting Distinct() items and are faster than looping through the items. 有一些函式可用來管理項目路徑和字串。There are functions to manipulate item paths and strings. 如需詳細資訊,請參閱 Item 函式For more information, see Item functions.

項目中繼資料item metadata
請參閱<中繼資料,項目> 。See metadata, item.

項目類型item type
項目類型是具名的項目清單,可用來做為工作的參數。Item types are named lists of items that can be used as parameters for tasks. 工作會使用項目值來執行建置程序的步驟。The tasks use the item values to perform the steps of the build process. 如需詳細資訊,請參閱項目For more information, see Items.

中繼資料,項目metadata, item
項目中繼資料是與項目相關聯的名稱/值組集合。Item metadata is a collection of name-value pairs that is associated with an item. 除了已知的中繼資料,中繼資料還會提供項目的描述性資訊,而且是選擇性的。Metadata provides descriptive information for the item and is optional, except for well-known metadata. 如需詳細資訊,請參閱項目For more information, see Items.

中繼資料,已知metadata, well-known
已知的中繼資料是使用預先定義的值初始化的唯讀項目中繼資料。Well-known metadata is read-only item metadata that is initialized by using a predefined value. 已知的中繼資料會針對參考檔案的項目提供描述性資訊。Well-known metadata provides descriptive information for an item that references a file. 例如,名為 FullPath 的已知中繼資料值是參考檔案的完整路徑。For example, the value of the well-known metadata named FullPath is the full path of the referenced file. 如需詳細資訊,請參閱項目For more information, see Items.

多目標multitargeting
應用程式或組件專案能夠以來自 MSBuild 和 Visual Studio 的許多不同 CLR 和架構為目標。The ability for an application or assembly project to target many different CLR's and frameworks from MSBuild and from Visual Studio.

設定檔profile
完整架構的子集。A subset of the full framework. 這可用來減少需要下載到電腦的需求量。This is used to minimize the amount that needs to be downloaded to a machine.

專案檔project file
專案檔包含控制組建的 MSBuild 指令碼。A project file contains the MSBuild script that controls the build. 專案檔的副檔名結尾通常是 proj,例如 .csproj.vbprojProject files typically have a file extension that ends with proj, such as .csproj or .vbproj. 專案檔可匯入屬性檔和目標檔案。Project files may import property files and target files.

屬性property
屬性是用來控制建置程序的索引鍵/值組。A property is a key-value pair that is used to control the build process. 如需詳細資訊,請參閱 MSBuild 屬性For more information, see MSBuild properties.

屬性,環境property, environment
環境屬性是會自動初始化為具相同名稱之系統環境變數值的屬性。An environment property is a property that is automatically initialized to the value of a system environment variable that has the same name. 如需詳細資訊,請參閱 MSBuild 屬性For more information, see MSBuild properties.

屬性檔property file
屬性檔是包含大部分屬性群組及可引導建置之項目群組的專案檔。A property file is a project file that contains mostly property groups and item groups that guide the build. 依照慣例,其副檔名為 .propsBy convention, It has the file extension .props. 通常會在相關聯的專案檔開始時匯入屬性檔。Property files are typically imported at the beginning of associated project files.

屬性,函式property, function
屬性函式是一個系統屬性或方法,可用於評估 MSBuild 指令碼。A property function is a system property or method that can be used to evaluate MSBuild scripts. 屬性方法可用來讀取系統時間、比較字串、比對規則運算式,以及執行其他動作。Property methods can be used to read the system time, compare strings, match regular expressions, and perform other actions. 如需詳細資訊,請參閱 Property 函式For more information, see Property functions.

屬性函式,巢狀property function, nested
屬性函式可能會加以結合,以形成更複雜的函式。Property functions may be combined to form more complex functions. 例如,套用至物件的For example,

$([MSBuild]::BitwiseAnd(32, $([System.IO.File]::GetAttributes(tempFile))))

如需詳細資訊,請參閱 Property 函式For more information, see Property functions.

屬性,全域property, global
全域屬性是用來控制建置程序的索引鍵/值組。A global property is a key-value pair that is used to control the build process. 您可以在命令提示字元上,或使用 MSBuild 工作Properties 屬性來設定全域屬性,而且無法在組建的評估階段加以修改。Global properties are set at a command prompt, or by using the Properties attribute of an MSBuild task, and cannot be modified during the evaluation phase of a build. 如需詳細資訊,請參閱 MSBuild 屬性For more information, see MSBuild properties.

屬性,本地property, local
區域屬性是用來控制建置程序的索引鍵/值組。A local property is a key-value pair that is used to control the build process. 這個詞彙只能用於區分非全域屬性的屬性。This term is only used to distinguish a property that is not a global property.

屬性,登錄property, registry
登錄屬性的值是使用可讀取系統登錄子機碼值的特殊語法來設定。A registry property has a value that is set by using a special syntax that reads the value of a system registry subkey. 如需詳細資訊,請參閱 MSBuild 屬性For more information, see MSBuild properties.

屬性,已保留property, reserved
保留的屬性是用來控制建置程序的索引鍵/值組。A reserved property is a key-value pair that is used to control the build process. 保留的屬性會自動初始化為預先定義的值。Reserved properties are automatically initialized to predefined values. 如需詳細資訊,請參閱 MSBuild 屬性For more information, see MSBuild properties.

專案範圍project-scope
專案範圍會說明一個 MSBuild 物件 (例如,區域屬性),此物件只能在包含專案檔以及它匯入的任何專案中看見。Project-scope describes an MSBuild object, for example, a local property, that is visible only in the containing project file and to any projects that it imports.

專案,子系project, child
MSBuild 工作會在專案建置期間建立子專案。A child project is created by the MSBuild task during a project build. 這個新的專案是專案的子系,其會包含或匯入包含 MSBuild 工作的目標專案。This new project is a child of the project that contains or imports the target that contains the MSBuild task. 除非使用 Properties 屬性加以修改,否則子專案會繼承父專案的全域屬性。The child project inherits the global properties of the parent project, unless they are modified by the Properties attribute.

可轉散發套件清單redist list
可轉散發套件清單︰對應至指定架構的組件清單。Redistribution list: the list of assemblies that correspond to a given framework.

參考組件reference assembly
在設計階段用來建立應用程式的組件。An assembly that is used during design time to create an application. 您可以從參考組件中移除實際的程式碼和私用介面,僅留下中繼資料和公用介面。A reference assembly can have the actual code and private interfaces removed from it, leaving only the metadata and public interfaces.

登錄屬性registry property
請參閱<屬性,登錄> 。See property, registry.

目標target
目標會以特殊順序將工作分組,並公開專案檔的區段做為建置程序的進入點。A target groups tasks together in a particular order and exposes sections of the project file as entry points into the build process. 如需詳細資訊,請參閱目標For more information, see Targets.

目標,建置target, building
請參閱<目標,執行>。See target, running.

目標,評估target, evaluating
由於累加編譯的緣故,因此必須針對屬性和項目的潛在變更來分析目標。Because of incremental compilation, targets must be analyzed for potential changes to properties and items. 即使會略過目標,還是必須進行這些變更。Even if the target is skipped, these changes must be made. 評估目標表示會執行此分析並進行這些變更。Evaluating a target means performing this analysis and making these changes. 如需詳細資訊,請參閱累加建置For more information, see Incremental builds.

目標,執行 (executing)target, executing
執行目標表示會評估該目標,並執行所有不含任何條件的工作,或其條件評估為 true 的工作。Executing a target means evaluating it and executing all tasks that have no conditions, or whose conditions evaluate to true. 在累加編譯期間,可能會略過或執行目標,但一律會評估它們。During incremental compilation, targets may be skipped or executed, but they are always evaluated. 如需詳細資訊,請參閱<目標,評估>。For more information, see target, evaluating.

目標,執行 (running)target, running
不會執行有條件評估為 false 的目標,也就是,不會對組建產生任何影響。A target that has a condition that evaluates to false is not run, that is, has no effect on the build. 執行或略過執行的目標。Targets that run are either executed or skipped. 在任一情況下,都會評估目標。In either case, the target is evaluated. 如需詳細資訊,請參閱<目標,評估>。For more information, see target, evaluating.

目標,略過target, skipping
如果累加編譯判斷所有的輸出檔都是最新狀態,則會略過目標,也就是,會評估目標,但不會執行目標內的工作。If incremental compilation determines that all output files are up-to-date, then the target is skipped, that is, the target is evaluated, but the tasks within the target are not executed. 如需詳細資訊,請參閱<目標,評估>。For more information, see target, evaluating.

目標 Framework Monikertarget framework moniker
一個名稱,可描述架構 (例如 .NETFramwork、Silverlight 等)、版本及您希望設為目標的設定檔 (例如用戶端、伺服器等)。A name that describes the framework (such as .NETFramework, Silverlight, etc.), the version, and the profile (such as Client, Server, etc.) that you wish to target.

目標套件targeting pack
特定架構隨附的組建清單,以及一組適用於該架構的參考組件。The list of assemblies that are distributed with a given framework and the set of reference assemblies for that framework.

目標檔案targets file
目標檔案是一個專案檔,其中包含大部分的目標及可引導組建的工作。A targets file is a project file that contains mostly targets and tasks that guide the build. 依照慣例,其副檔名為 .targetsBy convention, It has the file extension .targets. 通常會在相關聯的專案檔結束時匯入目標檔案。Target files are typically imported at the end of associated project files.

工作task
工作是 MSBuildMSBuild 專案用來執行建置作業之可執行程式碼的單元。Tasks are units of executable code that MSBuildMSBuild projects use to perform build operations. 例如,工作可能是編譯輸入檔,或是執行外部工具。For example, a task might compile input files or run an external tool. 如需詳細資訊,請參閱工作For more information, see Tasks.

轉換transform
轉換是從一個項目集合到另一個的一對一轉換。A transform is a one-to-one conversion of one item collection to another. 除了啟用專案來轉換項目集合,轉換還能讓目標識別其輸入和輸出之間的直接對應。In addition to enabling a project to convert item collections, a transform enables a target to identify a direct mapping between its inputs and outputs. 如需詳細資訊,請參閱轉換For more information, see Transforms.

已知的中繼資料well-known metadata
請參閱<中繼資料,已知> 。See metadata, well-known.

另請參閱See also