HostServices.SetNodeAffinity Method

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.

.NET Framework Security

See Also

Reference

HostServices Class

Microsoft.Build.Execution Namespace