Unable to save changes in snippet manager
![Bobby_Tables](https://us.v-cdn.net/6029854/uploads/userpics/C4MSORV28MH1/nOSAJ91B881NJ.png)
I have many snippets I've created the past few years and I was trying to clean up. If I delete any snippet I am unable to save changes (clicking Ok). I get the below modal. I have version: 10.13.12.1701
![](src)
![Image: https://us.v-cdn.net/6029854/uploads/editor/qv/fnk3fh8c8zs4.png](https://us.v-cdn.net/6029854/uploads/editor/qv/fnk3fh8c8zs4.png)
Stack trace from the logs.
![](src)
![Image: https://us.v-cdn.net/6029854/uploads/editor/qv/fnk3fh8c8zs4.png](https://us.v-cdn.net/6029854/uploads/editor/qv/fnk3fh8c8zs4.png)
Stack trace from the logs.
2023-07-29 23:43:19.467 -07:00 [Error] Failed to save settings due to snippet error.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at RedGate.SqlPrompt.CommonUI.Options.Pages.Snippets.ViewModels.SnippetsPageViewModel.SaveChangesToModel()
at RedGate.SqlPrompt.CommonUI.Options.Pages.Suggestions.SnippetsPage.Save()
at RedGate.SqlPrompt.CommonUI.Options.OptionsForm.OnOkButtonClicked(Object sender, EventArgs e)
Tagged:
Answers