Created
February 16, 2011 13:04
-
-
Save hotgazpacho/829333 to your computer and use it in GitHub Desktop.
Using the XmlUpdate task from MSBuild Community Tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Import Project=".\MSBuild.Community.Tasks.Targets"/> | |
| <PropertyGroup> | |
| <Company>My Company</Company> | |
| <Product>My Product</Product> | |
| <Version>1.0.0.0</Version> | |
| </PropertyGroup> | |
| <Target Name="UpdateBuildInfo"> | |
| <XmlUpdate XmlFileName=".\_BuildInfo.xml" XPath="//buildInfo/projectName" Value="$(Product)" /> | |
| <XmlUpdate XmlFileName=".\_BuildInfo.xml" XPath="//buildInfo/companyName" Value="$(Company)" /> | |
| <XmlUpdate XmlFileName=".\_BuildInfo.xml" XPath="//buildInfo/version" Value="$(Version)" /> | |
| </Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment