diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMapGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMapGenerator.cs index aeba133dce6..c162f01c032 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMapGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMapGenerator.cs @@ -65,7 +65,7 @@ internal sealed class ModuleReleaseData public byte[] MvidBytes; public AssemblyDefinition Assembly; public TypeMapReleaseEntry[] Types; - public Dictionary DuplicateTypes; + public List DuplicateTypes; public string AssemblyName; public string AssemblyNameLabel; public string OutputFilePath; @@ -382,7 +382,7 @@ bool GenerateRelease (bool skipJniAddNativeMethodRegistrationAttributeScan, List Assembly = td.Module.Assembly, AssemblyName = td.Module.Assembly.Name.Name, TypesScratch = new Dictionary (StringComparer.Ordinal), - DuplicateTypes = new Dictionary (), + DuplicateTypes = new List (), }; tempModules.Add (moduleUUID, moduleData); } @@ -410,7 +410,7 @@ bool GenerateRelease (bool skipJniAddNativeMethodRegistrationAttributeScan, List // build) and has no value for the end user. The message is left here because it may be useful to us // in our devloop at some point. //logger ($"Warning: duplicate Java type name '{entry.JavaName}' in assembly '{moduleData.AssemblyName}' (new token: {entry.Token})."); - moduleData.DuplicateTypes.Add (entry.Token, entry); + moduleData.DuplicateTypes.Add (entry); } else moduleData.TypesScratch.Add (entry.JavaName, entry); } diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs index 442b0bed57b..899fc60903e 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs @@ -237,7 +237,7 @@ void WriteMapModules (NativeAssemblyGenerator generator, StreamWriter mapOutput, if (mapOutput != null) { WriteManagedMaps (generator, mapOutput, mapName, data.Types); if (data.DuplicateTypes.Count > 0) { - WriteManagedMaps (generator, mapOutput, duplicateMapName, data.DuplicateTypes.Values); + WriteManagedMaps (generator, mapOutput, duplicateMapName, data.DuplicateTypes); } } }