Sets the node affinity for the given project file.
MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Namespace:  Microsoft.Build.Execution
Assembly:  Microsoft.Build (in Microsoft.Build.dll)
Syntax
'Declaration
Public Sub SetNodeAffinity ( _
    projectFile As String, _
    nodeAffinity As NodeAffinity _
)
public void SetNodeAffinity(
    string projectFile,
    NodeAffinity nodeAffinity
)
public:
void SetNodeAffinity(
    String^ projectFile, 
    NodeAffinity nodeAffinity
)
member SetNodeAffinity : 
        projectFile:string * 
        nodeAffinity:NodeAffinity -> unit
public function SetNodeAffinity(
    projectFile : String, 
    nodeAffinity : NodeAffinity
)
Parameters
- projectFile 
 Type: System.String- The project file. If set to String.Empty, all projects will use the given node affinity. If set to null, all node affinities will be cleared. 
- nodeAffinity 
 Type: Microsoft.Build.Execution.NodeAffinity- The node affinity. 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.