I have a file that I set using PowerShell that contains the version number of my build. I need to get this within MSBuild so I can act on it within my build script. It seems simple enough; I just want to take the contents of the file and set a property to that value.
I thought maybe doing an Exec task, doing a "more" on my file, and capturing standard out would do the trick, but I can't seem to get this to work. It appears that others have had problems with stdout and MSBuild as well. Here is what I have tried:
<Exec Command="more $(BuildDirectory)\version.txt" Outputs="stdout">
<Output TaskParameter="Outputs" ItemName="BuildNumber" />
</Exec>