return properties from target called by CallTarget in MSBuild -


i'm new msbuild google don't have idea how return property calltarget in msbuild (see below). not possible or

   <target name="createdbstgexistsprop">    <!-- see http://stackoverflow.com/questions/1373162/passing-property-group-value-from-one-msbuild-task-to-another why workaround needed -->    <propertygroup>     <db>$(dbstg)</db>     <machine>$(dwhdbstgmachine)</machine>    </propertygroup>   </target>    <target name="checkdbstgexists" dependsontargets="createdbstgexistsprop">    <calltarget targets="dbexists"/>    <!-- should pass property doesdbexist further reference created in target dbexists, not seem work -->     <message text="test: $(doesdbexist)"/>    </target>    <target name="dbexists"   >     <msbuild.extensionpack.sql2008.database taskaction="checkexists" machinename="$(machine)" databaseitem="$(db)" logexceptionstack="true">     <output taskparameter="exists" propertyname="doesexist"/>    </msbuild.extensionpack.sql2008.database>    <message text="database $(db) not exists" condition="!$(doesexist)"/>    <message text="database $(db) exist" condition="$(doesexist)"/>    <propertygroup>      <doesdbexist>$(doesexist)</doesdbexist>    </propertygroup>   </target>   

change this:

<target name="checkdbstgexists"   dependsontargets="createdbstgexistsprop">   <calltarget targets="dbexists" /> 

to this:

<target name="checkdbstgexists"   dependsontargets="createdbstgexistsprop;dbexists"> 

when target executed calltarget, dynamic properties created "published" in different manner if run because of dependsontargets.


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

html - How to set table cell value using jquery -