다음을 통해 공유


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.

public:
 property cli::array <System::String ^> ^ Value { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
[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; }
[<Microsoft.Build.Framework.Output>]
member this.Value : string[] with get, set
[<Microsoft.Build.Framework.Output>]
[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.Value : string[] with get, set
Public Property Value As String()

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