title: Trouble with outputting MSBuild variables
body: <p>I'm trying to output the variable from one target, into the parent target which started it. For example,</p>
  
  <p>Target 1 simply calls the task in file 2 and is supposed to be able to use the variable set within that. However, I just can't seem to get it to work (wrong syntax perhaps?). Target 1 looks like this:</p>
  
  <pre><code>&lt;Target Name="RetrieveParameter"&gt;
      &lt;MSBuild Projects="$(MSBuildProjectFile)" Targets="ObtainOutput" /&gt;
      &lt;Message Text="Output = $(OutputVar)" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>Target 2 is where it reads in the value of the text file and sets it to the property and sets the variable 'OutputVar' to match. This is supposed to be returned to the parent.</p>
  
  <pre><code>&lt;Target Name="ObtainOutput" Outputs="$(OutputVar)"&gt;
      &lt;ReadLinesFromFile File="output.txt"&gt;
          &lt;Output TaskParameter="Lines"
                  PropertyName="OutputVar" /&gt;
      &lt;/ReadLinesFromFile&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>I'm quite new to MSBuild tasks, so it could well be something obvious. All I want to do is set a variable in one task, and then have that available in the parent task which called it.</p>