Skip to content

Instantly share code, notes, and snippets.

@jonathanpeppers
Created January 10, 2014 21:16
Show Gist options
  • Save jonathanpeppers/8362757 to your computer and use it in GitHub Desktop.
Save jonathanpeppers/8362757 to your computer and use it in GitHub Desktop.
Add this to your csproj file, before the end of the closing </Project> tag to get AndroidManifest.xml replacement.
<Target Name="BeforeBuild" Condition=" '$(JENKINS)' == '1' ">
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="&lt;Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' /&gt;" Query="manifest/@android:versionCode" Value="$(SVN_REVISION)" />
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="&lt;Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' /&gt;" Query="manifest/@android:versionName" Value="2.0.$(SVN_REVISION)" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment