diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index 1f1bce9b53..9ef636a801 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -623,6 +623,12 @@ No action is required, this message is purely informational. For further information see bug #[52727](https://bugzilla.xamarin.com/show_bug.cgi?id=52727). +### MT0128: Could not touch the file '*': * + +A failure occurred when touching a file (which is done to ensure partial builds are done correctly). + +This warning can most likely be ignored; in case of any problems file a bug (https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS)) and it will be investigated. + # MT1xxx: Project related error messages ### MT10xx: Installer / mtouch diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs index 1b1d5e812d..7dd96a2b85 100644 --- a/tools/mtouch/mtouch.cs +++ b/tools/mtouch/mtouch.cs @@ -802,8 +802,13 @@ namespace Xamarin.Bundler { if (timestamp == null) timestamp = DateTime.Now; - foreach (var filename in filenames) - new FileInfo (filename).LastWriteTime = timestamp.Value; + foreach (var filename in filenames) { + try { + new FileInfo (filename).LastWriteTime = timestamp.Value; + } catch (Exception e) { + ErrorHelper.Warning (128, "Could not touch the file '{0}': {1}", filename, e.Message); + } + } } public static void Touch (params string [] filenames)