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 (); } }