test if an MSBuild property is defined? -


in msbuild, possible create msbuild condition (or situation) evaluate whether property 'defined' (presuming previous assigning property value somewhere)?

the following seems little clumsy reliable:

<propertygroup label="undefined state">      <defined></defined> </propertygroup>  <choose>    <when condition="('$(defined)' == '' or '$(defined)' != '')">         <message text="defined probably/likely/assuredly defined"/>     </when>     <otherwise>        <message text="defined reportedly/maybe/possibly not defined"/>     </otherwise> <choose> 

there exists common method overriding properties.

sample c:\windows\microsoft.net\framework\v4.0.30319\microsoft.common.targets

   <propertygroup>        <targetframeworkidentifier condition="'$(targetframeworkidentifier)' == ''">.netframework</targetframeworkidentifier>        <targetframeworkversion condition=" '$(targetframeworkversion)' == '' ">v4.0</targetframeworkversion>    </propertygroup> 

if try value $(neverdefinedproperty) empty string. can describe problem want solve?


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -