[MSBuild] Overwrite global property.

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

  <Target Name="t"> <!--try to overwrite value of 'aa'-->

    <Message Text="tt:$(aa) - print 'aa' insdie of t." />

    <CallTarget Targets="tt" />

  <Target Name="tt">
    <Message Text="tt:$(aa) - print 'aa' outside of t, t is not done." />

  <Target Name="u">
    <Message Text="u:$(aa) - print 'aa' outside of t, after t is done." />

  <Target Name="uu">
    <CallTarget Targets="t"/> <!--update 'aa' then print 'aa' inside t-->

    <CallTarget Targets="u"/> <!--print 'aa' outside of t-->

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: