diff --git a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs index 75611ab25..f06a5d74c 100644 --- a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs +++ b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs @@ -138,7 +138,7 @@ namespace Xamarin.Android.BuildTools.PrepTasks return curVersion > maxVersion; } - static readonly Regex VersionMatch = new Regex (@"(?\d+\.\d+(\.\d+(\.\d+)?)?)"); + static readonly Regex VersionMatch = new Regex (@"(?\d+(\.\d+(\.\d+(\.\d+)?)?)?)"); Version GetCurrentVersion () { @@ -167,6 +167,9 @@ namespace Xamarin.Android.BuildTools.PrepTasks if (!m.Success) return; curVersion = m.Groups ["version"].Value; + if (!curVersion.Contains (".")) { + curVersion += ".0"; + } }; p.Start (); p.BeginOutputReadLine ();