diff --git a/src/PluginMerge/Creator/FileCreator.cs b/src/PluginMerge/Creator/FileCreator.cs index 3e303b9..8db5f87 100644 --- a/src/PluginMerge/Creator/FileCreator.cs +++ b/src/PluginMerge/Creator/FileCreator.cs @@ -220,11 +220,12 @@ private void WriteExtensionUsings() } } + HashSet addedTypes = new(); foreach (FileType file in _extensionTypes) { foreach (string type in allTypes) { - if (file.ContainsType(type)) + if (file.ContainsType(type) && addedTypes.Add(type)) { _writer.WriteIndent(); _writer.WriteUsingAlias(type, $"{_settings.Merge.PluginName}.{type}");