diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md index 891aecdf0ad..796e2388d58 100644 --- a/Documentation/guides/messages/README.md +++ b/Documentation/guides/messages/README.md @@ -43,6 +43,7 @@ + [XA0115](xa0115.md): Invalid value 'armeabi' in $(AndroidSupportedAbis). This ABI is no longer supported. Please update your project properties. + [XA0116](xa0116.md): Unable to find `EmbeddedResource` of name `{ResourceName}`. + [XA0117](xa0117.md): The TargetFrameworkVersion {TargetFrameworkVersion} is deprecated. Please update it to be v4.4 or higher. ++ [XA0118](xa0118.md): Could not parse '{TargetMoniker}' ### XA1xxx Project Related @@ -50,6 +51,7 @@ + [XA1001](xa1001.md): AndroidResgen: Warning while updating Resource XML '{filename}': {Message} + [XA1002](xa1002.md): We found a matching key '{Key}' for '{Item}'. But the casing was incorrect. Please correct the casing + [XA1003](xa1003.md): '{zip}' does not exist. Please rebuild the project. ++ [XA1005](xa1005.md): Attempting naive type name fixup for element with ID '{id}' and type '{managedType}' ### XA2xxx Linker diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CalculateLayoutCodeBehind.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CalculateLayoutCodeBehind.cs index ad958d68c5e..4bea20e9ce3 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CalculateLayoutCodeBehind.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CalculateLayoutCodeBehind.cs @@ -317,8 +317,8 @@ void CreateWidget (XPathNavigator current, string filePath, string androidNS, st managedType = managedType.Substring (0, idx).Trim (); if (mayNeedTypeFixup && (idx = managedType.LastIndexOf ('.')) >= 0) { - LogWarning ($"Attempting naive type name fixup for element with ID '{id}' and type '{managedType}'"); - LogMessage ("If the above fixup fails, please add `tools:managedType` attribute to the element with fully qualified managed type name of the element"); + LogCodedWarning ("XA1005", $"Attempting naive type name fixup for element with ID '{id}' and type '{managedType}'"); + LogCodedWarning ("XA1005", "If the above fixup fails, please add `xamarin:managedType` attribute to the element with fully qualified managed type name of the element"); oldType = managedType; string ns = managedType.Substring (0, idx); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs index 07785d4989d..5201c8792c0 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs @@ -267,7 +267,7 @@ private void AddRename (string android, string user) var ext = Path.GetExtension (android); var dir = Path.GetDirectoryName (user); - Log.LogWarning ("Resource target names differ; got '{0}', expected '{1}'.", + Log.LogDebugMessage ("Resource target names differ; got '{0}', expected '{1}'.", Path.Combine (dir, Path.GetFileName (to) + ext), Path.Combine (dir, Path.GetFileName (curTo) + ext)); } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs index ffa1c475294..9d0763fbb22 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs @@ -108,14 +108,14 @@ void AddAttributeValue (ICollection items, CustomAttribute attr, string bool isDirectory, string fullPath) { if (!attr.HasConstructorArguments || attr.ConstructorArguments.Count != 1) { - LogWarning ("Attribute {0} doesn't have expected one constructor agrument", attr.AttributeType.FullName); + LogCodedWarning (errorCode, "Attribute {0} doesn't have expected one constructor agrument", attr.AttributeType.FullName); return; } CustomAttributeArgument arg = attr.ConstructorArguments.First (); string path = arg.Value as string; if (string.IsNullOrEmpty (path)) { - LogWarning ("Attribute {0} contructor argument is empty or not set to string", attr.AttributeType.FullName); + LogCodedWarning (errorCode, "Attribute {0} contructor argument is empty or not set to string", attr.AttributeType.FullName); return; } path = SubstituteEnvVariables (path).TrimEnd (Path.DirectorySeparatorChar); @@ -298,7 +298,7 @@ string MakeSureLibraryIsInPlace (string destinationBase, string url, string vers string file = Path.Combine (zipDir, !uri.IsFile ? hash + ".zip" : Path.GetFileName (uri.AbsolutePath)); if (string.IsNullOrEmpty (extraPath) && (!File.Exists (file) || !IsValidDownload (file, sha1) || !MonoAndroidHelper.IsValidZip (file))) { if (DesignTimeBuild) { - LogWarning ($"DesignTimeBuild={DesignTimeBuild}. Skipping download of {url}"); + LogDebugMessage ($"DesignTimeBuild={DesignTimeBuild}. Skipping download of {url}"); return null; } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ReadAdditionalResourcesFromAssemblyCache.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ReadAdditionalResourcesFromAssemblyCache.cs index d97a8166a95..6aa3a3c1759 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ReadAdditionalResourcesFromAssemblyCache.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ReadAdditionalResourcesFromAssemblyCache.cs @@ -37,7 +37,7 @@ public override bool Execute () Log.LogDebugMessage ("Task ReadAdditionalResourcesFromAssemblyCache"); Log.LogDebugMessage (" CacheFile: {0}", CacheFile); if (!File.Exists (CacheFile)) { - Log.LogWarning ("{0} does not exist. No Additional Resources found", CacheFile); + Log.LogDebugMessage ("{0} does not exist. No Additional Resources found", CacheFile); return !Log.HasLoggedErrors; } var doc = XDocument.Load (CacheFile); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ReadImportedLibrariesCache.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ReadImportedLibrariesCache.cs index a404bea1416..2f72c9d816f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ReadImportedLibrariesCache.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ReadImportedLibrariesCache.cs @@ -51,7 +51,7 @@ public override bool Execute () Log.LogDebugMessage ("Task ReadImportedLibrariesCache"); Log.LogDebugMessage (" CacheFile: {0}", CacheFile); if (!File.Exists (CacheFile)) { - Log.LogWarning ("{0} does not exist. No Imported Libraries found", CacheFile); + Log.LogDebugMessage ("{0} does not exist. No Imported Libraries found", CacheFile); return !Log.HasLoggedErrors; } var doc = XDocument.Load (CacheFile); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ReadLibraryProjectImportsCache.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ReadLibraryProjectImportsCache.cs index 2460c0e726a..c3c5705f589 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ReadLibraryProjectImportsCache.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ReadLibraryProjectImportsCache.cs @@ -57,7 +57,7 @@ public override bool Execute () Log.LogDebugMessage ("Task ReadLibraryProjectImportsCache"); Log.LogDebugMessage (" CacheFile: {0}", CacheFile); if (!File.Exists (CacheFile)) { - Log.LogWarning ("{0} does not exist. No Project Library Imports found", CacheFile); + Log.LogDebugMessage ("{0} does not exist. No Project Library Imports found", CacheFile); return !Log.HasLoggedErrors; } var doc = XDocument.Load (CacheFile); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs index 7c5b1b71b04..9debc44b268 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs @@ -173,12 +173,12 @@ AssemblyDefinition ResolveRuntimeAssemblyForReferenceAssembly (LockFile lockFile var framework = NuGetFramework.Parse (TargetMoniker); if (framework == null) { - LogWarning ($"Could not parse '{TargetMoniker}'"); + LogCodedWarning ("XA0118", $"Could not parse '{TargetMoniker}'"); return null; } var target = lockFile.GetTarget (framework, string.Empty); if (target == null) { - LogWarning ($"Could not resolve target for '{TargetMoniker}'"); + LogCodedWarning ("XA0118", $"Could not resolve target for '{TargetMoniker}'"); return null; } foreach (var folder in lockFile.PackageFolders) {