Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator] Don't process duplicate reference assemblies (#611)
When a binding project references another binding project, the list of references assemblies can contain duplicates, e.g. `mscorlib`: [0]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\mscorlib.dll" [1]: "C:\\code\\XamarinComponents\\Android\\BetterPickers\\source\\AndroidSwitchBackport\\bin\\Debug\\AndroidSwitchBackport.dll" [2]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\Java.Interop.dll" [3]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v9.0\\Mono.Android.dll" [4]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\mscorlib.dll" [5]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\System.Core.dll" [6]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\System.dll" [7]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\Facades\\System.Runtime.dll" [8]: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\ReferenceAssemblies\\Microsoft\\Framework\\MonoAndroid\\v1.0\\System.Xml.dll" There is no reason to scan any duplicate assemblies a second time, so add an `Enumerable.Distinct()` to prevent duplicates.
- Loading branch information