NodeAffinity 枚举


用于确定生成项目的位置的枚举数据类型。An enumerated data type that determines where projects are built.

public enum class NodeAffinity
public enum NodeAffinity
type NodeAffinity = 
Public Enum NodeAffinity


Any 2

可以在任何位置计划项目。The project may be scheduled anywhere.

InProc 0

只可以在进程内节点上计划项目。The project may only be scheduled on the in-proc node. 如果存在宿主对象或指定了 ProjectInstance,则会自动执行此操作。This happens automatically if there is a host object or if a ProjectInstance was specified. 如果已知某个任务显式依赖共享的静态数据或其他宿主提供的对象,则宿主可能会希望指定此项。A host may wish to specify it if they know a task depends explicitly on shared static data or other host-provided objects.

OutOfProc 1

只可以在进程外节点上计划项目。The project may only be scheduled on an out-of-proc node. 如果已知要生成的项目会损害宿主环境(或者宿主在进行生成的过程中损害环境),则宿主可能会希望指定此项。A host may wish to specify this if it is known the project being built could contaminate the host environment (or the host contaminates the environment while a build is proceeding.)