Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CreateProperty Task 

Populates properties with the values passed in. This allows values to be copied from one property or string to another.

The following table describes the parameters of the CreateProperty task.

Parameter Description


Optional String output parameter.

Specifies the value to copy to the new property.


Optional String output parameter.

Contains the same value as the Value parameter. Use this parameter only when you want to avoid having the output property set by MSBuild when it skips the enclosing target because the outputs are up-to-date.

The following example uses the CreateProperty task to create the NewFile property using the combination of the values of the SourceFilename and SourceFileExtension property.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


    <Target Name="CreateProperties">

                PropertyName="NewFile" />



After running the project, the value of the NewFile property is Module1.vb.

Community Additions

© 2015 Microsoft