From bb72066091b01d20a338489beec451002ab35e3f Mon Sep 17 00:00:00 2001 From: Brendan Zagaeski Date: Fri, 24 Jan 2020 21:26:46 -0800 Subject: [PATCH] [Xamarin.Android.Build.Tasks] Split up XA3001 errors and move them into .resx file Context: [0342fe56][0] Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/ Split up the different uses of XA3001 by giving each error condition its own code. This makes it possible to gather telemetry for each condition separately, and it also makes it easier for users to search for the particular code they are seeing. Move XA3001 and the other new error codes to the `.resx` file so that they are localizable. Remove the `try-catch` from `CilStrip.RunTask()` because after [d4c8f077][1], the `AndroidTask` base class now provides that functionality. [0]: https://github.com/xamarin/xamarin-android/commit/0342fe5698b86e21e36c924732ff135b9a87e4af [1]: https://github.com/xamarin/xamarin-android/commit/d4c8f077faefdfc6174355848a9d8c74ecaa8f56 --- Documentation/guides/messages/README.md | 8 +++- .../Properties/Resources.Designer.cs | 45 +++++++++++++++++++ .../Properties/Resources.resx | 18 ++++++++ .../Properties/xlf/Resources.cs.xlf | 25 +++++++++++ .../Properties/xlf/Resources.de.xlf | 25 +++++++++++ .../Properties/xlf/Resources.es.xlf | 25 +++++++++++ .../Properties/xlf/Resources.fr.xlf | 25 +++++++++++ .../Properties/xlf/Resources.it.xlf | 25 +++++++++++ .../Properties/xlf/Resources.ja.xlf | 25 +++++++++++ .../Properties/xlf/Resources.ko.xlf | 25 +++++++++++ .../Properties/xlf/Resources.pl.xlf | 25 +++++++++++ .../Properties/xlf/Resources.pt-BR.xlf | 25 +++++++++++ .../Properties/xlf/Resources.ru.xlf | 25 +++++++++++ .../Properties/xlf/Resources.tr.xlf | 25 +++++++++++ .../Properties/xlf/Resources.zh-Hans.xlf | 25 +++++++++++ .../Properties/xlf/Resources.zh-Hant.xlf | 25 +++++++++++ src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs | 4 +- .../Tasks/CilStrip.cs | 11 ++--- .../Tasks/CompileNativeAssembly.cs | 2 +- .../Tasks/LinkApplicationSharedLibraries.cs | 2 +- 20 files changed, 402 insertions(+), 13 deletions(-) diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md index 1a001cb7c6b..96afb55cc94 100644 --- a/Documentation/guides/messages/README.md +++ b/Documentation/guides/messages/README.md @@ -79,7 +79,13 @@ ms.date: 08/23/2019 ## XA2xxx: Linker -## XA3xxx: AOT +## XA3xxx: Unmanaged code compilation + ++ XA3001: Could not AOT the assembly: {assembly} ++ XA3002: Invalid AOT mode: {mode} ++ XA3003: Could not strip IL of assembly: {assembly} ++ XA3004: Could not compile native assembly file: {file} ++ XA3005: Could not link native shared library: {library} ## XA4xxx: Code generation diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs index a623fc4c13c..ec3ad0e09c9 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs @@ -60,6 +60,51 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to Could not AOT the assembly: {0}. + /// + internal static string XA3001 { + get { + return ResourceManager.GetString("XA3001", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid AOT mode: {0}. + /// + internal static string XA3002 { + get { + return ResourceManager.GetString("XA3002", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not strip IL of assembly: {0}. + /// + internal static string XA3003 { + get { + return ResourceManager.GetString("XA3003", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not compile native assembly file: {0}. + /// + internal static string XA3004 { + get { + return ResourceManager.GetString("XA3004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not link native shared library: {0}. + /// + internal static string XA3005 { + get { + return ResourceManager.GetString("XA3005", resourceCulture); + } + } + /// /// Looks up a localized string similar to The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.. /// diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index 96ba0557699..c5cccd6827c 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -117,6 +117,24 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + + + Could not link native shared library: {0} + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. {0} - The managed type name diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf index 5b70d8b482e..1fea40a53a4 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf index 9f9427fec93..f7c40223eb3 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf index 37b2fd56747..4bcaebc6408 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf index 82c7982d5e9..9d12920eed5 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf index bb86d18d3b8..093e5eabad5 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf index 9069103c3a2..185d3e2050f 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf index 63fa0be61c3..1c2679cf811 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf index 0a4ffa75b4d..2cdae24aa7b 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf index e27d677f03c..019828a0ce4 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf index b4a7a46023b..73a4de842ba 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf index 65781e40289..1b96a50ebed 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf index 558f25dc655..2bfb8d05da3 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf index 2618f7ceda8..bb56c4196af 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf @@ -2,6 +2,31 @@ + + Could not AOT the assembly: {0} + Could not AOT the assembly: {0} + The abbreviation "AOT" should not be translated. + + + Invalid AOT mode: {0} + Invalid AOT mode: {0} + The abbreviation "AOT" should not be translated. + + + Could not strip IL of assembly: {0} + Could not strip IL of assembly: {0} + The abbreviation "IL" should not be translated. + + + Could not compile native assembly file: {0} + Could not compile native assembly file: {0} + + + + Could not link native shared library: {0} + Could not link native shared library: {0} + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs index ad675df1133..21aeeef6bbe 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs @@ -230,7 +230,7 @@ public async override System.Threading.Tasks.Task RunTaskAsync () { bool hasValidAotMode = GetAndroidAotMode (AndroidAotMode, out AotMode); if (!hasValidAotMode) { - LogCodedError ("XA3001", "Invalid AOT mode: {0}", AndroidAotMode); + LogCodedError ("XA3002", Properties.Resources.XA3002, AndroidAotMode); return; } @@ -246,7 +246,7 @@ await this.WhenAllWithLock (GetAotConfigs (), } if (!RunAotCompiler (config.AssembliesPath, config.AotCompiler, config.AotOptions, config.AssemblyPath, config.ResponseFile)) { - LogCodedError ("XA3001", "Could not AOT the assembly: {0}", Path.GetFileName (config.AssemblyPath)); + LogCodedError ("XA3001", Properties.Resources.XA3001, Path.GetFileName (config.AssemblyPath)); Cancel (); return; } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CilStrip.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CilStrip.cs index 0e62dc40e3d..52b7a53a297 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CilStrip.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CilStrip.cs @@ -31,12 +31,7 @@ public CilStrip () public override bool RunTask () { - try { - return DoExecute (); - } catch (Exception e) { - Log.LogCodedError ("XA3001", "{0}", e); - return false; - } + return DoExecute (); } bool DoExecute () { @@ -45,7 +40,7 @@ bool DoExecute () { AotMode aotMode; bool hasValidAotMode = Aot.GetAndroidAotMode (AndroidAotMode, out aotMode); if (!hasValidAotMode) { - Log.LogCodedError ("XA3001", "Invalid AOT mode: {0}", AndroidAotMode); + Log.LogCodedError ("XA3002", Properties.Resources.XA3002, AndroidAotMode); return false; } @@ -74,7 +69,7 @@ bool DoExecute () { File.Copy (assemblyPath, nonstripPath, overwrite: true); if (!RunCilStrip (nonstripPath, assemblyPath)) { - Log.LogCodedError ("XA3001", "Could not strip IL of assembly: {0}", assembly.ItemSpec); + Log.LogCodedError ("XA3003", Properties.Resources.XA3003, assembly.ItemSpec); return false; } } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CompileNativeAssembly.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CompileNativeAssembly.cs index a2a8ea23b45..394324b5e1a 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CompileNativeAssembly.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CompileNativeAssembly.cs @@ -86,7 +86,7 @@ void RunAssembler (Config config) stdout_completed.WaitOne (TimeSpan.FromSeconds (30)); if (proc.ExitCode != 0) { - LogCodedError ("XA3001", $"Could not compile native assembly file: {Path.GetFileName (config.InputSource)}"); + LogCodedError ("XA3004", Properties.Resources.XA3004, Path.GetFileName (config.InputSource)); Cancel (); } } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/LinkApplicationSharedLibraries.cs b/src/Xamarin.Android.Build.Tasks/Tasks/LinkApplicationSharedLibraries.cs index 3f47bfe8d79..1e6eaa300da 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/LinkApplicationSharedLibraries.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/LinkApplicationSharedLibraries.cs @@ -95,7 +95,7 @@ void RunLinker (Config config) stdout_completed.WaitOne (TimeSpan.FromSeconds (30)); if (proc.ExitCode != 0) { - LogCodedError ("XA3001", $"Could not link native shared library: {Path.GetFileName (config.OutputSharedLibrary)}"); + LogCodedError ("XA3005", Properties.Resources.XA3005, Path.GetFileName (config.OutputSharedLibrary)); Cancel (); } }