CreateProperty.Value Property

Definition

The in/out property value.

This API supports the product infrastructure and is not intended to be used directly from your code.

[Microsoft.Build.Framework.Output]
public string[] Value { get; set; }
[Microsoft.Build.Framework.Output]
public string[] Value { [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }

Property Value

String[]

The value to copy to the new property

Attributes

Remarks

So ... why is this a string[] instead of a string? Basically if the project author passed in:

CreateProperty Value="Clean;Build" Output TaskParameter="Value" PropertyName="MyTargetsToBuild" /CreateProperty

We need to respect the semicolon that they put in the value, and need to treat this exactly as if they had done:

PropertyGroup MyTargetsToBuild="Clean;Build" /PropertyGroup

If we make this parameter a "string", then the engine will escape the value on the way out from the task back to the engine, creating a property that is set to "Clean%3BBuild", which is not what the user wanted.

Applies to